Mark Style not exported/imported

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Hermes
Newbie
Newbie
Posts: 33
Joined: Fri Feb 03, 2012 12:00 am

Mark Style not exported/imported

Post by Hermes » 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

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Mark Style not exported/imported

Post by Sandra » Tue Mar 27, 2012 2:45 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Hermes
Newbie
Newbie
Posts: 33
Joined: Fri Feb 03, 2012 12:00 am

Re: Mark Style not exported/imported

Post by Hermes » Tue Mar 27, 2012 6:17 pm

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!

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Mark Style not exported/imported

Post by Sandra » Wed Mar 28, 2012 2:01 pm

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 5368 times
I recommend you download last maintenace release of TeeChartFor.Net you can find here and check again if your problem persist.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Hermes
Newbie
Newbie
Posts: 33
Joined: Fri Feb 03, 2012 12:00 am

Re: Mark Style not exported/imported

Post by Hermes » Thu Mar 29, 2012 1:25 pm

That's right! The last version I found is 4.1.2012.02280 and it works fine now.

Thank you for your time!

Post Reply