BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Working with TChart and floating point values

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting
View previous topic :: View next topic  
Author Message
loke.dupont@gmail.com
Guest





PostPosted: Wed Sep 14, 2005 10:06 am    Post subject: Working with TChart and floating point values Reply with quote



Hi,

I have a TChart component placed on a form. I want values from a comma
separated file to plot data on my TChart.
Heres my problem. I tried doint a StrToFloat, all the data from the
file is in the form 3434.3434. My input locale is danish where we use
comma instead. I tried both doing ti with 334.3434, and with 3424,24545
and always get an error about it "not being a floating point value".

Another issue with this, is the program has to run on machines with
different input locales. How to i make this independent, the file it
has to read is always in the same format.

Best Regards
Loke

Back to top
ncalvet@gmail.com
Guest





PostPosted: Wed Sep 14, 2005 12:07 pm    Post subject: Re: Working with TChart and floating point values Reply with quote



[email]loke.dupont (AT) gmail (DOT) com[/email] wrote:
Quote:
Hi,

I have a TChart component placed on a form. I want values from a comma
separated file to plot data on my TChart.
Heres my problem. I tried doint a StrToFloat, all the data from the
file is in the form 3434.3434. My input locale is danish where we use
comma instead. I tried both doing ti with 334.3434, and with 3424,24545
and always get an error about it "not being a floating point value".

Another issue with this, is the program has to run on machines with
different input locales. How to i make this independent, the file it
has to read is always in the same format.

Hi Loke,

Setting DecimalSeparator (either dot or comma) before populating
series, like the code below, works fine here:


DecimalSeparator:=',';


Series1.Add(StrToFloat('32145,32155'));
Series1.Add(StrToFloat('33145,32155'));
Series1.Add(StrToFloat('34145,32155'));
Series1.Add(StrToFloat('35145,32155'));


--
Best Regards,


Narcís Calvet
http://support.steema.com


"Important note: If you are a TeeChart registered customer, please post

your
support questions at Steema's Support monitored Forums for customers:
http://support.steema.com for a prompter reply."

Quote:

Best Regards
Loke


Back to top
Riki Wiki
Guest





PostPosted: Fri Sep 16, 2005 6:57 pm    Post subject: Re: Working with TChart and floating point values Reply with quote



Hoi Loke and Narcis

Take a look here:
<http://tinyurl.com/8m5nw>
which links to
<http://delphi.wikicities.com/wiki/Delphi_Newsgroups>
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.