Maximum accepted value for Bar or Point series?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
DaVinci
Newbie
Newbie
Posts: 6
Joined: Wed Aug 29, 2007 12:00 am

Maximum accepted value for Bar or Point series?

Post by DaVinci » Tue Sep 06, 2011 1:39 pm

Hi,

I still use a previous TeeChart version (3.5) for .NET, which worked fine until now.
When I plot series data for my Bar or Point series, I use the Add(double x, double y) method.
Whenever a value for x and or y is bigger than 1.7E+300, the value is no longer drawn but instead, I get all different numbers drawn in my chart.

See attachment.
Thanks for you help.
Attachments
Snap1.png
Snap1.png (5 KiB) Viewed 4704 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Maximum accepted value for Bar or Point series?

Post by Narcís » Tue Sep 06, 2011 2:10 pm

Hi DaVinci,

TeeChart uses System.Double values internally. Having that in mind, code snippet below works fine.

Code: Select all

      tChart1.Series.Add(new Steema.TeeChart.Styles.Points()).Add(1.7E308);
      tChart1[0].Marks.Visible = true;

      tChart1.Axes.Visible = false;
      tChart1.Legend.Visible = false;
However, enabling axes visibility I get a rounding error because Math.Round doesn't use more than 15 digits. Is that the problem you get at your end? Otherwise, could you please send us a simple example project or a code snippet we can run "as-is" to reproduce the problem here?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

DaVinci
Newbie
Newbie
Posts: 6
Joined: Wed Aug 29, 2007 12:00 am

Re: Maximum accepted value for Bar or Point series?

Post by DaVinci » Wed Sep 07, 2011 10:47 am

Hi, Narcis,

Thank you for your quick reply.
You are right, it is indeed the label of the axis which generates this behaviour.
I entered a ValueFormat = "#.0 E+0" for the left axis and saw a perfect chart.

However, if I use such ValueFormat = "#.0 E+0", all labels of my axis appear in scientific notation, also if a value is 100, it is displayed as 1.0E+2.
Is there a way to avoid this and for smaller values, to display simply '100' for labels?
I know that number formatting like it exists in C, you can specify "%g" which does what I want. But I don't know if this exists in TeeChart?

Thanks for your help.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Maximum accepted value for Bar or Point series?

Post by Narcís » Wed Sep 07, 2011 10:59 am

Hi DaVinci,

TeeChart .NET uses .NET Framework Standard Numeric Format Strings and Custom Numeric Format Strings. If none of them fits your needs you can also manually parse axis labels using the GetAxisLabel event.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

DaVinci
Newbie
Newbie
Posts: 6
Joined: Wed Aug 29, 2007 12:00 am

Re: Maximum accepted value for Bar or Point series?

Post by DaVinci » Fri Sep 09, 2011 8:56 am

Thanks Narcis!
This was exactly what I was looking for.

Post Reply