Page 1 of 1

Why is the legend printing with incorrect size?

Posted: Tue Aug 30, 2011 8:47 pm
by 16459883
Hello!

I have a chart that displays two right-aligned legends. The first legend is the standard chart legend, and the second is a TExtraLegend tool. When I draw the legends on the screen, they appear correctly. It looks like this:
ScatterPlot_OnScreen_TwoLedgends.PNG
Both legends appear correctly on screen.
ScatterPlot_OnScreen_TwoLedgends.PNG (45.14 KiB) Viewed 5995 times
'Color by Cum Gas' is the standard legend and 'Size By Latest Gas' is the TExtraLegendTool.

When I print the chart by calling TChart.PrintLandscape, the resulting file looks like this:
ScatterPlot_Printed_TwoLegends.PNG
After printing, the TExtraLegendTool legend is incorrectly sized.
ScatterPlot_Printed_TwoLegends.PNG (188.17 KiB) Viewed 5985 times
Do you have any idea what might be going wrong here? I have tried looking into the TCustomChart.DrawTitlesAndLegend method, but I didn't see anything that looked like it would cause the legend to become huge. Is there another method you could reccomend for me to step through to try and understand what is happening?

Thanks a lot!

-erzsebet

Re: Why is the legend printing with incorrect size?

Posted: Wed Aug 31, 2011 1:22 pm
by yeray
Hello erzsebet,

It seems to be something related to the pointer sizes, isn't it?
Could you please arrange a simple example project we can run as-is to reproduce a similar chart as yours, where we can see how are you setting the series pointers and the extra legend symbols?

Re: Why is the legend printing with incorrect size?

Posted: Wed Aug 31, 2011 1:32 pm
by 16459883
Yeray, hi!

I think that might be the hint I need to unravel this issue! I am going to investigate my theory now. If I find the answer, I will post what it is here so that others can know ... and if I don't find the answer, I will try and make a sample app that reproduces the issue.

Nice working with you again!

-erzsebet

Re: Why is the legend printing with incorrect size?

Posted: Wed Aug 31, 2011 2:49 pm
by yeray
Hi Erzsebet,

I'm not sure about how could I have helped you but I'm glad if I've been inspiring :)