scaling axis for a subchart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Richard
Newbie
Newbie
Posts: 3
Joined: Wed Jan 18, 2012 12:00 am

scaling axis for a subchart

Post by Richard » Wed Jan 25, 2012 4:47 pm

I am using a subchart to plot a small version of my main chart as in

http://www.teechart.net/support/viewtop ... 15&start=0

I am having trouble getting the axis to line up nicely.

I would line the bottom axis always to be the same length and in the same start and end positions as the main chart. This is fine if I don't use labels or legends, but I don't seem able to calculate the correct positions to sent my left and right values for the subchart

ie
ChartTool1.Charts.Items[0].Left := ?
ChartTool1.Charts.Items[0].right := ?

The same happens with the top of the sub chart - if I use a axis title or a sub title on the main it overlays the subchart.

Thanks
Richard

Yeray
Site Admin
Site Admin
Posts: 9587
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: scaling axis for a subchart

Post by Yeray » Thu Jan 26, 2012 9:32 am

Hi Richard,

Here you'll find how to align two charts:
http://www.teechart.net/support/viewtop ... 20&start=0

I haven't tried with a TSubChartTool but it shouldn't be very different. And if you find too much problems, you can always use two charts instead of the TSubChartTool ;)
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply