![]() | 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: | Importing of functions does not set datasource | ||
|---|---|---|---|
| Product: | .NET TeeChart | Reporter: | Ruben Bermudez <ruben> |
| Component: | .NET 5.0 | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | marc |
| Priority: | High | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| URL: | http://support.steema.com/viewtopic.php?f=4&t=18061&sid=795bd92f8768922b21942bae224835c9 | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: | SteemaTChart | ||
This has been tested with build 4.2024.3.6 in the following way at runtime:
Open Chart with Point Series, populated with data:
- add average function and set datasource to first series
- Export chart to template stream, with data.
- Import template stream to new Chart
The second chart reflects the content of the first chart correctly.
test code:
========================
// 1) Save the template into a Stream...
System.IO.MemoryStream stream = new System.IO.MemoryStream();
try
{
// save only Chart and Series formatting, NOT including data
tChart1.Export.Template.Save(stream);
// 2) Load the template into other Chart...
stream.Position = 0;
tChart2.Import.Template.Load(stream);
// restore the chart alignment (in this example)
this.tChart2.Dock = DockStyle.Fill;
// repaint the Chart
this.tChart2.Refresh();
}
finally
{
// remove the stream, it's no longer necessary...
stream.Close();
}
========================
Changes were made to a January build of TeeChart that resoved this issue.
|
Created attachment 1059 [details] SteemaTChart Visual Studio 2022 .NET Framework 4.8 Steema.TeeChart.net Version 4.2023.11.6 When importing a function, the data source is set to null, therefore no data is found. In the tchart version 4.2023.4.18 the importing of a function was working correctly as it was setting the data source to the correct series. Has this behavior changed? Also when importing the chart the legend does not come up correctly as seen by screenshot, it is aligned to the left. Once clicked inside thee chart area the legend moves to the bottom.