Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
sb_giag
Newbie
Newbie
Posts: 6
Joined: Wed Jul 08, 2009 12:00 am

Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels

Post by sb_giag » Thu May 27, 2010 9:49 am

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
Attachments
TreeChartBugProof.zip
(39.1 KiB) Downloaded 364 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels

Post by Sandra » Thu May 27, 2010 12:04 pm

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,
Best Regards,
Sandra Pazos / 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

sb_giag
Newbie
Newbie
Posts: 6
Joined: Wed Jul 08, 2009 12:00 am

Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels

Post by sb_giag » Thu May 27, 2010 12:12 pm

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

sb_giag
Newbie
Newbie
Posts: 6
Joined: Wed Jul 08, 2009 12:00 am

Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels

Post by sb_giag » Fri May 28, 2010 7:23 am

Hello Steema
.. no reply ?

Can i assume that this bug is fixed in the next version ?

thanks stefan

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels

Post by Sandra » Fri May 28, 2010 8:51 am

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,

sb_giag
Newbie
Newbie
Posts: 6
Joined: Wed Jul 08, 2009 12:00 am

Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels

Post by sb_giag » Tue Jul 06, 2010 1:37 pm

Am i right that you din't fixed this bug in the june release ?
What's your roadmap ?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels

Post by Sandra » Thu Jul 08, 2010 9:04 am

Hello sb_giag,

We haven't forgotten this. We are investigating it and we'll be back here asap.

Thanks,
Best Regards,
Sandra Pazos / 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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels

Post by Sandra » Fri Jul 09, 2010 8:50 am

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,
Best Regards,
Sandra Pazos / 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

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Major BUG in Steema.TeeChart.Axis.AxisDraw.DoDefaultLabels

Post by Marc » Wed Jul 21, 2010 2:19 pm

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
Steema Support

Post Reply