Error series not being plotted

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
chandran
Newbie
Newbie
Posts: 6
Joined: Fri Jan 31, 2014 12:00 am

Error series not being plotted

Post by chandran » Fri Jun 27, 2014 2:46 pm

Hi,

Please find herewith attached sample application with data and axis parameters specified.
Error series is not drawn for the specified data.

Point added for error series in sample is (-34, 0.3, 35).
If it is changed to (-33, 0.3, 34), the error series is drawn correctly.

Is there anything incorrect with this? Please suggest if there exists a solution to display the series with specified data.
PS: we want to retain the specified values for axis parameters (i.e. minimum, maximum).

We are using TeeChart for .NET (4.1.2014.5092).

Thanks,
Chandran
Attachments
WindowsFormsApplication2.zip
(16.73 KiB) Downloaded 564 times

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

Re: Error series not being plotted

Post by Narcís » Mon Jun 30, 2014 8:31 am

Hi Chandran,

It is not being plotted due to the bottom axis scale you provide. You'll see that scrolling the chart to the right. First of all, notice that axis maximum must be greater than minimum. Since you provide greater minimum than maximum, TeeChart swaps both values internally. Anyway, for your bar to be visible you should change the bottom axis scale. Using the code below both bars are visible.

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            
            errorSeries = new Error(tChart1.Chart);

            // VISIBLE IF UNCOMMENTED 
            //errorSeries.Add(-33, 0.3, 34);

            // NOT VISIBLE IF UNCOMMENTED 
            errorSeries.Add(-34, 0.3, 35);           
            
            errorSeries.ErrorWidth = 10;
            errorSeries.ErrorStyle = ErrorStyles.LeftRight;
            errorSeries.ErrorPen.Width = 5;

            tChart1.Axes.Left.SetMinMax(0, 0.74);
            //tChart1.Axes.Bottom.SetMinMax(0.677, 1.01);
            tChart1.Axes.Bottom.SetMinMax(-1, 1.01);
        }
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

chandran
Newbie
Newbie
Posts: 6
Joined: Fri Jan 31, 2014 12:00 am

Re: Error series not being plotted

Post by chandran » Wed Jul 16, 2014 12:37 pm

Thanks Narcis.
Indeed, minimum value was greater than maximum in attached zipped sample.

The corrected sample is uploaded.
But the issue still persists.

To check the issue, please comment following lines from sample:

Code: Select all

// VISIBLE IF UNCOMMENTED 
errorSeries.Add(-33, 0.3, 34);
and, remove following commented statement:

Code: Select all

//errorSeries.Add(-34, 0.3, 35);
With this modifications, you could see the error bar series.

The problem appears when we have error series with (-33, 0.3, 34) , that is when you run attached application without modification.
Please suggest if any fix is available for this.

Thanks,
Chandran
Attachments
WindowsFormsApplication2.zip
sample application
(18.05 KiB) Downloaded 568 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Error series not being plotted

Post by Christopher » Wed Jul 16, 2014 3:01 pm

Hello Chandran,
chandran wrote: Please suggest if any fix is available for this.
The problem disappears if you replace:

Code: Select all

            //tChart1.Axes.Bottom.Minimum = 0.677;
            //tChart1.Axes.Bottom.Maximum = 1.01;
            tChart1.Axes.Bottom.Minimum = 0;
            tChart1.Axes.Bottom.Maximum = 1;
This is because the Axes Maximum and Minimum settings are modified by the Error series in order to paint itself. This automatic resizing can sometimes cause confusing effects, such as the one you've just found. Apologies for this. The best I can suggest is that you do not use constant values for your Axes Maximum and Minimums but use values based on the Series ValueLists (XValues, YValues and ErrorValues, in this case).
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply