Save and read plot

Oystein Bjorke 4 years ago 0
This discussion was imported from CodePlex

sharethl wrote at 2012-08-19 02:40:

Hi

Could any one tell me what is the best way to save plot? including annotations and series.

One way I saw an example is :

create Property class for each annotation, then serialize a collection of property classes.

when read the saved file, base on property classes to create plot with annotations. 


objo wrote at 2012-08-21 13:04:

It should be possible to serialize the PlotModel, but I am not sure if I would recommend it... The data structure may change... I think the client application should be responsible for this, using its own model. I'm interested in hearing other opinions on this!


sharethl wrote at 2012-08-21 16:06:

I did test to serialize PlotModel, 

Some properties could not be serialized, like Plot, OxyThichness(need add serialized attribute.)

So will user property class to make a copy of annotation and save them. easier.

 

Thanks


objo wrote at 2012-08-23 15:53:

I added http://oxyplot.codeplex.com/workitem/9986, it should not be difficult to fix this!

CodePlex