Y-axis autoscale issue.
Y-axis autoscale issue.
Hi
If I configure my Y-axis to be automatic (autoscale), and I have samples that go between values of 0 and 1, the Y-axis labels will not be drawn correctly to indicate the range of the data (i.e. I expect something like 0 as the bottom label, and 1 as the top label, but instead it will draw one label in the middle of the Y-axis.
Is this a configuration issue? What can be done about this, so that autoscaling takes care of this labelling automatically?
thanks,
Ben.
If I configure my Y-axis to be automatic (autoscale), and I have samples that go between values of 0 and 1, the Y-axis labels will not be drawn correctly to indicate the range of the data (i.e. I expect something like 0 as the bottom label, and 1 as the top label, but instead it will draw one label in the middle of the Y-axis.
Is this a configuration issue? What can be done about this, so that autoscaling takes care of this labelling automatically?
thanks,
Ben.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ben,
By default TeeChart tries to draw as many labels as can be fitted in an axis provided they don't overlap.
It would be helpful if you read this thread. It's a pretty long thread (several pages) but covers almost all options.
Hope this helps!
By default TeeChart tries to draw as many labels as can be fitted in an axis provided they don't overlap.
It would be helpful if you read this thread. It's a pretty long thread (several pages) but covers almost all options.
Hope this helps!
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 |
Hi Narcís.
Thanks for the information, however this is not an issue of label crowding, but really the opposite, where not enough labels are being drawn. If an axis has been configured as automatic, then I believe the internal alogorithm that is being executed to calculate the set of axis labels, should take into consideration the data range especially in the case where the data range falls between 2 whole numbers. Right now it seems that the 'automatic' algorithm looks at the data range and will only display one label, either in the middle of the axis, or toward the top of the axis. The end effect is that with only one label on the Y-axis, the customer is complaining that visually it is difficult to cross-correlate plotted points against their actual Y-axis value.
So here's the expectation:
A fully-labelled y-axis, regardless of the range from min to max; ie., with regular tick marks and appropriate labels along the entire range of the y-axis. So if it goes from 0 to 1, then the y-axis should be labelled with tick marks and values of 0.1, 0.2, 0.3, 0.4, etc. If the y-axis has a min-max of 0.005 to 0.006, then it similarly should be labelled 0.0051, 0.0052, 0.0053, 0.0054, etc.
Is this something that can be enabled now, or addressed in a future release?
thanks,
Ben.
Thanks for the information, however this is not an issue of label crowding, but really the opposite, where not enough labels are being drawn. If an axis has been configured as automatic, then I believe the internal alogorithm that is being executed to calculate the set of axis labels, should take into consideration the data range especially in the case where the data range falls between 2 whole numbers. Right now it seems that the 'automatic' algorithm looks at the data range and will only display one label, either in the middle of the axis, or toward the top of the axis. The end effect is that with only one label on the Y-axis, the customer is complaining that visually it is difficult to cross-correlate plotted points against their actual Y-axis value.
So here's the expectation:
A fully-labelled y-axis, regardless of the range from min to max; ie., with regular tick marks and appropriate labels along the entire range of the y-axis. So if it goes from 0 to 1, then the y-axis should be labelled with tick marks and values of 0.1, 0.2, 0.3, 0.4, etc. If the y-axis has a min-max of 0.005 to 0.006, then it similarly should be labelled 0.0051, 0.0052, 0.0053, 0.0054, etc.
Is this something that can be enabled now, or addressed in a future release?
thanks,
Ben.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ben,
To achieve what you request you can try setting axis increment to your desired value. Another option is using custom axis labels. You'll find an example of custom labels at All Features\Welcome !\Axes\Labels\Custom labels in the features demo available at TeeChart's program group.
If your problem persists please send us a simple example project we can run "as-is" to reproduce the issue here.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
To achieve what you request you can try setting axis increment to your desired value. Another option is using custom axis labels. You'll find an example of custom labels at All Features\Welcome !\Axes\Labels\Custom labels in the features demo available at TeeChart's program group.
If your problem persists please send us a simple example project we can run "as-is" to reproduce the issue here.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
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 |
Hi Narcís.
Well, as I was preparing the sample application to send on to you, after which I saw that the y-axis labels were being displayed as expected. Further investigation of our implementation revealed that the axis Increment property was the cause of our issue, because it was being defaulted to 1. From the sample application the default value was 0, and this setting gave us the y-axis labels that made sense, if the automatic property was set to true.
Can you confirm that setting the Increment property to 0, is supposed to have this effect, with a brief description of exactly what this property is supposed to control, if set to values other than 0...
thanks,
Ben.
Well, as I was preparing the sample application to send on to you, after which I saw that the y-axis labels were being displayed as expected. Further investigation of our implementation revealed that the axis Increment property was the cause of our issue, because it was being defaulted to 1. From the sample application the default value was 0, and this setting gave us the y-axis labels that made sense, if the automatic property was set to true.
Can you confirm that setting the Increment property to 0, is supposed to have this effect, with a brief description of exactly what this property is supposed to control, if set to values other than 0...
thanks,
Ben.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ben,
As described in the help file:
Axis Increment is the minimum step between axis labels. It must be a positive number or DateTime value. TChart will use this value as the starting axis labels step. If there is not enough space for all labels, TChart will calculate a bigger one. You can use the DateTimeStep constant array for DateTime increments.
By default Increment is zero. So, this means that TeeChart tries to plot as many labels as possible in an axis. Logically, using zero increment would overlap labels so the automatically the minimum increment that doesn't overlap labels is used.
As described in the help file:
Axis Increment is the minimum step between axis labels. It must be a positive number or DateTime value. TChart will use this value as the starting axis labels step. If there is not enough space for all labels, TChart will calculate a bigger one. You can use the DateTimeStep constant array for DateTime increments.
By default Increment is zero. So, this means that TeeChart tries to plot as many labels as possible in an axis. Logically, using zero increment would overlap labels so the automatically the minimum increment that doesn't overlap labels is used.
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 |
Hi Narcís,
One thing I did notice, is that all the y-axis labels are being drawn more reasonably by setting the increment to 0, but the label that should read 0 is not being drawn at all. So for example if the data range is -1 to +2, I will see labels calcaulated and drawn as -1, -.8, -.6, -.4, -.2, (space for, but no label for 0), .2, .4, .6, .8, 1, 1.2, 1.4, 1.6, 1.8, 2
Is there a way to force it to drawn the 0 label (and still have it drawn the other labels)?
thanks,
Ben.
One thing I did notice, is that all the y-axis labels are being drawn more reasonably by setting the increment to 0, but the label that should read 0 is not being drawn at all. So for example if the data range is -1 to +2, I will see labels calcaulated and drawn as -1, -.8, -.6, -.4, -.2, (space for, but no label for 0), .2, .4, .6, .8, 1, 1.2, 1.4, 1.6, 1.8, 2
Is there a way to force it to drawn the 0 label (and still have it drawn the other labels)?
thanks,
Ben.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ben,
I'm afraid not unless you use custom labels. You could also play with axes MinimumOffset and MaximumOffset.
I'm afraid not unless you use custom labels. You could also play with axes MinimumOffset and MaximumOffset.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ben,
Could you please send us a simple example project we can run "as-is" to reproduce the issue here and see if we can make the zero label appear?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Could you please send us a simple example project we can run "as-is" to reproduce the issue here and see if we can make the zero label appear?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ben,
Thanks for the example project.
Just commenting in the axis.Labels.ValueFormat line or setting it to axis.Labels.ValueFormat = "0.0"; solves the problem for me here.
Can you please try if it works fine at your end?
Thanks in advance!
Thanks for the example project.
Just commenting in the axis.Labels.ValueFormat line or setting it to axis.Labels.ValueFormat = "0.0"; solves the problem for me here.
Can you please try if it works fine at your end?
Thanks in advance!
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 |
Yep that worked, but only for the specified data range.
If you change the code at the bottom from
double val = -1;
this.lineSeries1.Add(val, val/1);
val = 2;
this.lineSeries1.Add(val, val / 1);
to
double val = -1;
this.lineSeries1.Add(val, val/1000000);
val = 2;
this.lineSeries1.Add(val, val / 1000000);
and try it again, you'll see that the 0 doesn't appear again (NOTE: you'll also need to change the axis.Labels.ValueFormat)??
thanks,
Ben.
If you change the code at the bottom from
double val = -1;
this.lineSeries1.Add(val, val/1);
val = 2;
this.lineSeries1.Add(val, val / 1);
to
double val = -1;
this.lineSeries1.Add(val, val/1000000);
val = 2;
this.lineSeries1.Add(val, val / 1000000);
and try it again, you'll see that the 0 doesn't appear again (NOTE: you'll also need to change the axis.Labels.ValueFormat)??
thanks,
Ben.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ben,
Ok, setting ValueFormat as below works fine here.
Ok, setting ValueFormat as below works fine here.
Code: Select all
axis.Labels.ValueFormat = "0.###############";
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 |