hi,
does SciChart provides any mechanism to serialize a chart along with the data plotted?
My requirement is that I should be able to save the chart as a file and restore it back.
Please advise.
Thanks,
Vibin
- Vibin Varghese asked 7 years ago
- You must login to post comments
Hi Vibin,
Sorry we’re not handling\supporting serialization of DataSerieses, what i can suggest you is:
extend the renderable series you need(or even whole sciChartSurface) and override there WriteXml() and ReadXml() methods
public class SciChartSurfaceExt : SciChartSurface
{
public override void WriteXml(XmlWriter writer)
{
base.WriteXml(writer);
var rSerieses = RenderableSeries;
foreach (var rSeries in rSerieses)
{
var seria = (FastLineRenderableSeries) rSeries;
if (seria != null)
{
var ds = seria.DataSeries as XyDataSeries<double, double>; ;
if (ds != null)
{
//do what you need;
// ds.XValues and ds.YValues
}
}
}
}
}
something like this, and here “//do what you need” you can try to serialize it by yourself and deserialization part also
- Nazariy Pelyushkevych answered 7 years ago
- last edited 4 years ago
- You must login to post comments
Please login first to submit.