Hi,
I have been trying to coordinate the width of two charts. Chart A have the legend on, while Chart B don't.
I need to change the width of Chart B so that it will look like both Chart A and B have the same width, but without the legend(for chart B).
I have been trying to resize Chart B through this code:
TChartB.Width = TChartA.Width - (LegendRect * TwipsPerPixelY)
where LegendRect is the width of the legend rectangle.
However, I noticed that even after I step through this line, the width of the chart doesn't change (even if the return value of ChartA width and legend rect width is different from the original ChartB width). ChartB retains its old width.
Am I doing this correctly or is there any other way to change the width of the chart.
Thanks
Chart width
Hi,
what are you trying to change , the panel or the ChartRect width ?
In case you want o have the same ChartRect for both Chart then the best thing you can do is align them using the Chart Margins, for example set the same right margind for both Charts :
tChart1.Panel.MarginRight = 10
tChart2.Panel.MarginRight = 10 + LegendRect
what are you trying to change , the panel or the ChartRect width ?
In case you want o have the same ChartRect for both Chart then the best thing you can do is align them using the Chart Margins, for example set the same right margind for both Charts :
tChart1.Panel.MarginRight = 10
tChart2.Panel.MarginRight = 10 + LegendRect
Pep Jorge
http://support.steema.com
http://support.steema.com