Hello,
After I added a series to the bar-chart, its zero point located in the center of the left axis.
Example:
Zero point is located in the bottom left corner as soon as I start showing a data, however until data are added to the chart it looks like shown on the screenshot.
Please, help me make it look consistently without data.
Thanks.
Move bar-chart zero point to the bottom left corner
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Move bar-chart zero point to the bottom left corner
Hello,
To get proper axis scaling without populating the series in the chart, you need to manually set axes scales, for example:
If your problems persist please attach a simple example project we can run "as-is" to reproduce the problem here.
To get proper axis scaling without populating the series in the chart, you need to manually set axes scales, for example:
Code: Select all
tChart1.Axes.Left.SetMinMax(0, 10);
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: Move bar-chart zero point to the bottom left corner
I have already tried this way, however this sets constant maximum for the Y axis. I want it to be changed automatically depending on data.
I do not know data in advance, so I cannot set the maximum.
I do not know data in advance, so I cannot set the maximum.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Move bar-chart zero point to the bottom left corner
Hello,
Thanks for your feedback.
Can you please attach a Short, Self Contained, Correct (Compilable), Example?
Thanks in advance.
Thanks for your feedback.
Can you please attach a Short, Self Contained, Correct (Compilable), Example?
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 |
Re: Move bar-chart zero point to the bottom left corner
Thank you Narcis!
I did this in the following way: set the Y axis to some default value and use automatic settings when values to display are not null.
I did this in the following way: set the Y axis to some default value and use automatic settings when values to display are not null.
Code: Select all
if (allNulls)
{
Chart.Axes.Left.Automatic = false;
Chart.Axes.Left.SetMinMax(0, m_barChartYMaximum);
}
else
{
Chart.Axes.Left.Automatic = true;
}