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 734 - Exporting to image the size of the first exported chart is used, not the actual
Summary: Exporting to image the size of the first exported chart is used, not the actual
Status: RESOLVED FIXED
Alias: None
Product: ActiveX TeeChart
Classification: Unclassified
Component: Exporting (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-16 10:18 EDT by yeray alonso
Modified: 2017-01-09 12:03 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2014-04-16 10:18:03 EDT
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;