We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Chart template programmatically

Thread ID:

Created:

Updated:

Platform:

Replies:

64234 Jul 17,2007 10:17 AM UTC Jul 17,2007 11:30 AM UTC Windows Forms 1
loading
Tags: Chart
Ramachandran
Asked On July 17, 2007 10:17 AM UTC

Hi,

I am using Essential Chart v5.1.

How can I save and load a template using Essential Chart control through code?

Thanks in advance.

Ramachandran

Rashidha F [Syncfusion]
Replied On July 17, 2007 11:30 AM UTC

Hi Ramachandran,

Thanks for using Syncfusion Products.

If your intention is to save and load template through programmatically means, please use the following code snippet in your application.

ChartTemplate temp = new ChartTemplate(typeof(ChartControl));

//Save Template:
private void Save_Click(object sender, EventArgs e)
{
this.chartControl1.ShowContextMenu = true;
temp.Scan(chartControl1);
MemoryStream ms = new MemoryStream();
temp.Save("chart.xml");
MessageBox.Show("Saved properly");
}

//Load Template
private void Load_Click(object sender, EventArgs e)
{
temp.Apply(chartControl2);
temp.Load("chart.xml");
MessageBox.Show("Loaded properly");
}

Please refer the following sample.

http://websamples.syncfusion.com/samples/Chart.Windows/F64234/main.htm

The above sample which illustrates how to save and load template programmatically.

Please let me know if this helps.

Thanks and Regards,
Rashidha.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;