Page 1 of 1
Maximum accepted value for Bar or Point series?
Posted: Tue Sep 06, 2011 1:39 pm
by 14046574
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.
Re: Maximum accepted value for Bar or Point series?
Posted: Tue Sep 06, 2011 2:10 pm
by narcis
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.
Re: Maximum accepted value for Bar or Point series?
Posted: Wed Sep 07, 2011 10:47 am
by 14046574
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.
Re: Maximum accepted value for Bar or Point series?
Posted: Wed Sep 07, 2011 10:59 am
by narcis
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!
Re: Maximum accepted value for Bar or Point series?
Posted: Fri Sep 09, 2011 8:56 am
by 14046574
Thanks Narcis!
This was exactly what I was looking for.