Page 1 of 1

Mark Style not exported/imported

Posted: Mon Mar 26, 2012 8:23 pm
by 15661479
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

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();
        }
    }

Re: Mark Style not exported/imported

Posted: Tue Mar 27, 2012 2:45 pm
by 10050769
Hello Hermes,

I have modified your project and I change your TempChartStyle from Httphandler to Session and it works fine for me. Can you tell us if next code works fine for you?

Code: Select all

   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.Session;

            System.IO.MemoryStream lStream = new System.IO.MemoryStream();

            lChart1.Chart.Export.Template.Save(lStream);

            WebChart lchart2 = new WebChart();
            lStream.Position = 0;
            lchart2.Chart.Import.Template.Load(lStream);
         
            lchart2.TempChart = TempChartStyle.Session;
    }
Thanks,

Re: Mark Style not exported/imported

Posted: Tue Mar 27, 2012 6:17 pm
by 15661479
Hi Sandra,

I am getting the exact same result as with httpHandler.

I am using Steema TeeChart for .NET 2011 4.1.2012.01030, which version are you using? If you are using the same one, what else should I look at?

Thanks!

Re: Mark Style not exported/imported

Posted: Wed Mar 28, 2012 2:01 pm
by 10050769
Hello Hermes,

I am working with last version of TeeChartFor.Net (4.1.2012.02283), your code works fine for me and I get next results:
Test.jpg
Test.jpg (52.45 KiB) Viewed 5374 times
I recommend you download last maintenace release of TeeChartFor.Net you can find here and check again if your problem persist.

Thanks,

Re: Mark Style not exported/imported

Posted: Thu Mar 29, 2012 1:25 pm
by 15661479
That's right! The last version I found is 4.1.2012.02280 and it works fine now.

Thank you for your time!