Page 1 of 1

TChart ExtraLegendTool Property

Posted: Wed Apr 20, 2011 9:36 pm
by 10555104
For TChart, there is a Legend property to control the legend for the Chart, but how do you get access to an ExtraLegendTool for a chart. I have a reference for one of the legends, but not the other. The reason I am trying to control both of the chart's legends is that printing a chart causes the legends to increase in size and makes the paper chart unusable.

Re: TChart ExtraLegendTool Property

Posted: Fri Apr 22, 2011 10:00 am
by yeray
Hello DNDI,

I'm not sure to understand what exact problem do you have with the legend.
If you want to see an example of TExtraLegendTool usage, please take a look at the example at "All features\Welcome !\Tools\Extra Legend tool" in the feature demo program included with the installation.

Re: TChart ExtraLegendTool Property

Posted: Mon Apr 25, 2011 9:01 pm
by 10555104
My problem is that with two legends ( a standard and an Extra Legend Tool ), when print the chart, the legends are horribly sized to the point that the legends so large that one of them is forced off the page, and the other is way too big relative to the chart.

Re: TChart ExtraLegendTool Property

Posted: Tue Apr 26, 2011 10:41 am
by narcis
Hi DNDI,

Have you checked the example Yeray suggested at the new features demo, available at TeeChart's program group created by the binary installers? In demo's code you can see how extra legend tool is referenced and how you can customize chart legend's position.

Re: TChart ExtraLegendTool Property

Posted: Tue Apr 26, 2011 8:25 pm
by 10555104
I looked through the examples, and can't find one that matches our scenario. It seems that after a Chart.Repaint the legends and extralegend tools are sizing incorrectly on the screen, and the printed image's legends are sized incorrectly. What procedures and functions are invoked when Chart.PrintLandscape is called? ( not just Chart.print, but the other functions it steps though ). I ask because this seems to print the legend incorrectly, and the repaint draws them incorrectly on the display, so I think other functions that are called in those processes might have errors since we override a lot of those for this one particular chart. I am trying to build an example but am having difficulties at the moment.

Re: TChart ExtraLegendTool Property

Posted: Thu Apr 28, 2011 2:28 pm
by 10050769
Hello DNDI,

Thanks to information. Thanks to information. We will wait if you send us your simple example to reproduce exactly problemhere. Moreover,if you are source code customer, feel free to check how the legend and TExtralegenttool are drawn.

Thanks,