Mark Style not exported/imported
Posted: Mon Mar 26, 2012 8:23 pm
Running the folowing code you will see how Series.Mark.Styles is not saved/loaded on the chart. The second chart doesn't show percent on marks as the first one.
Is this behaviour correct?
Thanks
Is this behaviour correct?
Thanks
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
WebChart lChart1 = new WebChart();
Pie lSerie1 = new Pie(lChart1.Chart);
lSerie1.FillSampleValues(5);
lSerie1.Marks.Style = MarksStyles.Percent;
lSerie1.Marks.Visible = true;
lChart1.TempChart = TempChartStyle.Httphandler;
PlaceHolder1.TemplateControl.Controls.Add(lChart1);
MemoryStream lStream = new MemoryStream();
lChart1.Chart.Export.Template.Save(lStream);
WebChart lchart2 = new WebChart();
lStream.Position = 0;
lchart2.Chart.Import.Template.Load(lStream);
PlaceHolder1.TemplateControl.Controls.Add(lchart2);
lchart2.TempChart = TempChartStyle.Httphandler;
lStream.Close();
}
}