![]() | Steema Issues DatabaseNote: 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. |
| Summary: | Exporting to image the size of the first exported chart is used, not the actual | ||
|---|---|---|---|
| Product: | ActiveX TeeChart | Reporter: | yeray alonso <yeray> |
| Component: | Exporting | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | pep |
| Priority: | --- | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| URL: | http://www.teechart.net/support/viewtopic.php?f=1&t=14861&view=unread#unread | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
Here a simple example: Private Sub Command1_Click() TChart1.Export.asJPEG.SaveToFile "e:\\tmp\\testAXSize1.jpg" End Sub Private Sub Command2_Click() TChart1.Width = TChart1.Width + 1000 TChart1.Export.asJPEG.SaveToFile "e:\\tmp\\testAXSize2.jpg" End Sub Private Sub Form_Load() TChart1.Aspect.View3D = False End Sub - Click on Button1 - Click on Button2 - Compare the images generated. Both testAXSize1.jpg and testAXSize2.jpg have the same size. This is wrong. - Then close and restart the application - Click on Button2 - Now testAXSize2.jpg has the updated and correct size. This doesn't happen in VCL with the following code: uses TeeStore, TeeJpeg; procedure TForm1.Button1Click(Sender: TObject); var exportFormat: TJPEGExportFormat; begin exportFormat:=TJPEGExportFormat.Create; exportFormat.Panel:=Chart1; exportFormat.SaveToFile('e:\tmp\testVCLSize1.jpg'); end; procedure TForm1.Button2Click(Sender: TObject); var exportFormat: TJPEGExportFormat; begin Chart1.Width:=Chart1.Width + 100; exportFormat:=TJPEGExportFormat.Create; exportFormat.Panel:=Chart1; exportFormat.SaveToFile('e:\tmp\testVCLSize2.jpg'); end; procedure TForm1.FormCreate(Sender: TObject); begin Chart1.View3D:=false; end;