I am using following code to set symbol shape, color, width etc for chart series using following code.
Code 1 - Start this.chartcontrol1.Series[1].Style.Symbol.Shape = (ChartSymbolShape)Enum.Parse(typeof(ChartSymbolShape), ChartSymbolShape.Diamond.ToString(), true);
this.chartcontrol1.Series[1].Style.Symbol.Color = Color.FromArgb(random.Next(256), random.Next(256), random.Next(256));
this.chartcontrol1.Series[1].Style.Symbol.Size = sizeOfSymbol;
this.chartcontrol1.Series[1].Style.Interior = new Syncfusion.Drawing.BrushInfo(Color.FromArgb(random.Next(256), random.Next(256), random.Next(256)));
this.chartcontrol1.Series[1].Style.Border.Width = 2.0f;
Code 1 - End
I am saving chart series using following code
Code 2 - Start
chart.Series[seriesName].Style.WriteXmlSchema(xmlWriter);
Code 2 - End
and for loading it back we are using
Code 3 - Start
chart.Series[seriesName].Style.WriteXmlSchema(xmlWriter);
Code 3 - End
Now when loading chart back by using above code the chart series settings are lost.
The problem is if i set any property for chart series using " tag code 1" as above, nothing gets saved and when i try to set it from chart series configuration dialog i get exception "In valid property" and in details it is "Object reference is not set to a an instance of an object".
When i don't set any property from code(i.e. " tag code 1" is not used...but Tag code 2 and 3 are same) and set configuration only using configuration dialog, Everything is ok...
Now please help me in how to set default properties as written in "tag -code 1" above. Save it using "Tag code 2" reload it using "tag code 3". and also change the above properties using configuration dialog.
Summary of steps to reproduce: Using line chart.
1) Set default properties using Tag Code 1.
2) Save and re load chart using Tag 2 and Tag 3. Do not close complete application. use a button to do this.
3) Now using configuration dialog try to set width of line or shape of line(diamond or circle etc).
4) It will say invalid property and in details it will show object reference is not set to an instance of an object.
Please correct my code of Tag code 1,2,3 if there is anything wrong.
Kindly try to reply as soon as possible as i am in middle of something.
MA
Manohari
Syncfusion Team
October 18, 2008 03:27 PM UTC
Hi Prabhjeet,
We regret very much for the delayed response. Currently we do not have support to load the ChartStyleInfo that is saved using the WriteXmlSchema in to the ChartControl. However, we have created a feature request in this regard and have forwarded it to our Development team. I will get back to you regarding the timeline for implementing this feature with in a week.
Kindly let us know if you need any other information.
Thanks for your patience.
Regards,
Manohari.R