Page 1 of 1

Chart X Axes alignment

Posted: Wed Apr 01, 2009 1:32 pm
by 13052797
Hi,
I have a problem with the axes alignment in the graph.

When ever a graph is generated with zero values, the x axes gets moved to the center instead of bottom. (Check the file ChartAxesCenter.png uploaded to http://www.steema.net/upload/Default.aspx)
Can you please let me know if there is a way to always place the x-axis in the bottom.

Regards,
Mahadevan

Posted: Wed Apr 01, 2009 2:32 pm
by yeray
Hi Mahadevan,

You always can set left axis minimum and maximum manually. For example:

Code: Select all

tChart1.Axes.Left.SetMinMax(0,1);

Chart X Axes alignment

Posted: Wed Apr 01, 2009 3:26 pm
by 13052797
Hi Yeray,

Thanks a lot,
tChart1.Axes.Left.SetMinMax(0,1) works.

But I am wondering if there is already a reported bug for this issue(Axes alignment is changing with the data), if not can you please report it.

Thanks And Regards,
Mahadevan

Posted: Thu Apr 02, 2009 7:12 am
by narcis
Hi Mahadevan,

I don't think it's a bug. It's by design.

Posted: Thu Apr 02, 2009 2:32 pm
by 13052797
Hi,
I still feel that it is a bug as the graph attributes are changing if the values are zeros.

Can you please add it as a wish if not as a bug

Posted: Fri Apr 03, 2009 9:34 am
by narcis
Hi Mahadevan,

I may not understand which is the problem here. By default, if all values are zero in an axis or if it has no values zero value is drawn centered in the axis. Is that your problem? If so, what would you expect? If not, could you please give us more details about the exact problem?

Remember that you can manually set axes scales using SetMinMax as Yeray suggested.

Posted: Fri Apr 03, 2009 10:05 am
by 13052797
Hi Narcis,
Yes your understanding is correct.

I would expect that the graph is aligned to the left and bottom (with no negative axis shown if the values are zeros).

May be a property can be added which can control how the graph would look by default (aligned center with all the axes or aligned left with only positive axes)

Thanks And Regards,
Mahadevan

Posted: Fri Apr 03, 2009 11:16 am
by narcis
Hi Mahadevan,

Thanks for the information. No negative values are displayed in such cases neither they are on the image you sent. Anyway, I'll add your request to the wish-list to be considered for inclusion in future releases.