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
Error series not being plotted
Error series not being plotted
- Attachments
-
- WindowsFormsApplication2.zip
- (16.73 KiB) Downloaded 564 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Error series not being plotted
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.
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 |
Instructions - How to post in this forum |
Re: Error series not being plotted
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:
and, remove following commented statement:
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
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);
Code: Select all
//errorSeries.Add(-34, 0.3, 35);
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
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Error series not being plotted
Hello Chandran,
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).
The problem disappears if you replace:chandran wrote: Please suggest if any fix is available for this.
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;
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 |