![]() | 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: | Add an event to modify properties when saving the chart to Stream/File | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | yeray alonso <yeray> |
| Component: | Export | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | enhancement | CC: | yeray |
| Priority: | --- | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| URL: | https://www.steema.com/support/viewtopic.php?f=3&t=17976 | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: | test example | ||
The latest version (v2023.38) adds SaveChartToString/LoadChartFromString which could do the job without having to add a new event into the Chart. Here the example:
procedure TForm1.BSaveClick(Sender: TObject);
var lStringList:TStringList;
procedure DeleteIfExists(prop: string);
var idx: Integer;
begin
idx:=lStringList.IndexOf(prop);
if idx>=0 then
lStringList.Delete(idx);
end;
begin
lStringList:=TStringList.Create;
lStringList.Text:=SaveChartToString(Chart1);
DeleteIfExists('Marks.OnTop');
MemoXML.Lines:=lStringList;
end;
procedure TForm1.BLoadClick(Sender: TObject);
begin
LoadChartFromString(Chart1, MemoXML.Lines.Text);
end;
|
Created attachment 1050 [details] test example It could be sometimes useful to allow modifying the properties that are being saved to a Stream, as the customer in the forums suggests. I've added the customers test project with the event - under development - commented out.