Page 1 of 1
Axis title position
Posted: Tue Jan 15, 2008 9:38 am
by 9339785
Hi,
How can I know the axis title position (in pixel units) ?
I tried to read TChartAxis.ShapeBounds but it returns (0,0,0,0).
I also want to know if it is possible to move the axis title on the graph with the mouse ?
Thanks in advance
Franck
Posted: Tue Jan 15, 2008 10:17 am
by narcis
Hi Franck,
How can I know the axis title position (in pixel units) ?
I tried to read TChartAxis.ShapeBounds but it returns (0,0,0,0).
Where are you retrieving this values? You should do that at a stage where the chart has been drawn (eg.: OnAfterDraw event) or call Chart1.Draw() before retrieving the values.
I also want to know if it is possible to move the axis title on the graph with the mouse ?
I'm afraid this is not possible at the moment. TSelectorTool doesn't support axes title dragging. I'll add your request to our wish-list to be considered for inclusion in future releases.
Posted: Tue Jan 15, 2008 10:41 am
by 9339785
It is simple to reproduce this pb. Put a button on a graph who is displaying a trace, and on the OnClick event of the button put this code :
Code: Select all
ShowMessage(inttostr(Chart1.BottomAxis.Title.ShapeBounds.Left) + ' ' +
inttostr(Chart1.BottomAxis.Title.ShapeBounds.Top) + ' ' +
inttostr(Chart1.BottomAxis.Title.ShapeBounds.Bottom) + ' ' +
inttostr(Chart1.BottomAxis.Title.ShapeBounds.Right));
The message will be: 0 0 0 0
Any ideas ?
Franck
Posted: Tue Jan 15, 2008 10:53 am
by narcis
Hi Franck,
Thanks for the information. I've been able to reproduce the issue here using TeeChart Pro v7 VCL. However, it works fine using TeeChart Pro v8 VCL.