Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 634

Summary: The legend rectangle isn't recalculated when the chart is exported to a smaller size
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ExportAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: enhancement CC: david
Priority: ---    
Version: 140220   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=3&t=14757&p=65244#p65244
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: legend rect isn't recalcualted at TeeCreateBitmap

Description yeray alonso 2014-03-14 04:56:33 EDT
Created attachment 113 [details]
legend rect isn't recalcualted at TeeCreateBitmap

See the attached project. It comes with images.

There's a Chart with a TBarSeries with 9 values and the legend aligned to the bottom. This legend is drawn in two rows to fit all the values in the chart width.

Then, we export the chart with TeeCreateBitmap and we show the result in a TImage. This TImage is smaller in width than the Chart.

In v2013.08, the chart created with TeeCreateBitmap presented a legend with 3 rows. So the number of rows and columns is recalculated to fit the new size.

In v2013.09 and up, the chart created with TeeCreateBitmap has the same number of rows in the legend, so it doesn't have enough space to fit the legend and its cut.
Comment 1 david berneda 2014-03-17 09:57:40 EDT
Fixed.

When calculating the number of legend rows, Chart.Width (the original width) was being used instead of Chart.ChartBounds.Width (the real width when drawing the chart onto the image).