 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
loke.dupont@gmail.com Guest
|
Posted: Wed Sep 14, 2005 10:06 am Post subject: Working with TChart and floating point values |
|
|
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
|
Posted: Wed Sep 14, 2005 12:07 pm Post subject: Re: Working with TChart and floating point values |
|
|
[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."
|
|
| Back to top |
|
 |
Riki Wiki Guest
|
Posted: Fri Sep 16, 2005 6:57 pm Post subject: Re: Working with TChart and floating point values |
|
|
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 |
|
 |
|
|
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
|
|