Page 1 of 1
Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels
Posted: Thu May 27, 2010 9:49 am
by 15653680
Hi
There is a
Bug in
Code: Select all
Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels
resulting in an
endless loop.
This happens when a series has values with only a small difference. (eg. 1.0 and 0.99999999999999989 )
see the attachment for an proof.
please fix this as fast as possible.
thanks
stefan
Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels
Posted: Thu May 27, 2010 12:04 pm
by 10050769
Hello sb_giag,
I think that your problem is solved, if you use SetMinMax() property of Axes. Please, see next code and check if it works as you want.
Code: Select all
public BugProof()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
line1.Clear();
DateTime time = DateTime.Now;
line1.XValues.DateTime = true;
line1.Add(time, 1.0);
time = time.AddMinutes(15);
line1.Add(time, 0.99999999999999989);
time = time.AddMinutes(15);
panel1.Axes.Left.Automatic = false;
panel1.Axes.Left.SetMinMax(0.5,1.5);
panel1.Axes.Left.Increment = 0.01;
panel1.Axes.Bottom.Increment = Steema.TeeChart.Utils.GetDateTimeStep(Steema.TeeChart.DateTimeSteps.FifteenMinutes);
}
I hope will helps.
Thanks,
Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels
Posted: Thu May 27, 2010 12:12 pm
by 15653680
Hi Sandra
This is definitly NOT a solution, only a workaround. You have to fix this bug.
Our customer is not forced to set the min and max property.
If he does not set these properties and loads a chart with this two values, our application hangs.
Thanks Stefan
Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels
Posted: Fri May 28, 2010 7:23 am
by 15653680
Hello Steema
.. no reply ?
Can i assume that this bug is fixed in the next version ?
thanks stefan
Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels
Posted: Fri May 28, 2010 8:51 am
by 10050769
Hello Stefan,
Ok, I have added your problem in bug report list with number [TF02014915]. We will try to fix it for next maintenance releases of TeeChart.Net. Also, I have made other workaround that check when you add a new point.
Code: Select all
private void InitializeChart()
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(panel1.Chart);
line1.Add(1);
line1.Add(1, 0.99999999999999989);
CheckLeftAxis();
}
private void CheckLeftAxis()
{
double diff = panel1[0].YValues.Maximum - panel1[0].YValues.Minimum;
if (diff < 0.0000001)
panel1.Axes.Left.SetMinMax(panel1[0].YValues[0] - diff * 1000, panel1[0].YValues[1] + diff * 1000);
}
I hope will helps.
Thanks,
Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels
Posted: Tue Jul 06, 2010 1:37 pm
by 15653680
Am i right that you din't fixed this bug in the june release ?
What's your roadmap ?
Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels
Posted: Thu Jul 08, 2010 9:04 am
by 10050769
Hello sb_giag,
We haven't forgotten this. We are investigating it and we'll be back here asap.
Thanks,
Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels
Posted: Fri Jul 09, 2010 8:50 am
by 10050769
Hello sb_giag,
After several tests, we decide close the bug as not bug. Because, by default a Double value contains 15 decimal digits of precision as explained in this link:
http://msdn.microsoft.com/en-us/library/643eft0t.aspx. You can check it, with next code that works fine here with next version of TeeChart .Net
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.Line line1;
private void InitializeChart()
{
line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.XValues.DateTime = true;
line1.Add(1, 1.0);
line1.Add(2, 0.999999999999999);//15 decimal digits - ok
//line1.Add(2, 0.99999999999999989); //17 decimal digits - not ok
line1.ValueFormat = "N15";
tChart1.Axes.Left.Increment = 1e-15;
tChart1.Axes.Left.Labels.ValueFormat = "N15";
}
On the other hand, if you want that
0.99999999999999 value appears in Left axis labels, you need change tChart1.Axes.Left.Increment and tChart1.Axes.Left.Labels.ValueFormat, as do in the code of this post, because difference between 1 and 0.99999999999999 is very small.
Thanks,
Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels
Posted: Wed Jul 21, 2010 2:19 pm
by Marc
Hello,
Latest status for this thread: A code fix has been made for this issue, to be included with the next maintenance release.
Regards,
Marc Meumann