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 2653 - Importing of functions does not set datasource
Summary: Importing of functions does not set datasource
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: .NET 5.0 (show other bugs)
Version: unspecified
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://support.steema.com/viewtopic.p...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-22 04:57 EST by Ruben Bermudez
Modified: 2024-03-08 09:48 EST (History)
1 user (show)

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


Attachments
SteemaTChart (8.24 KB, image/png)
2023-11-22 04:57 EST, Ruben Bermudez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ruben Bermudez 2023-11-22 04:57:11 EST
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.
Comment 1 marc meumann 2024-03-08 09:48:24 EST
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.