//=========================== Save ============================================= public static void Write(ChartData data, string fileName) { ChartSerializer s = new ChartSerializer(); using (XmlTextWriter w = new XmlTextWriter(fileName, Encoding.UTF8)) { s.w = w; w.Formatting = Formatting.Indented; w.WriteStartElement("ChartData"); if (!string.IsNullOrEmpty(data.Title)) { w.WriteAttributeString("Title", data.Title); } foreach (ChartCategory c in data.Categories) { s.WriteCategory(c); } foreach (ChartSeries series in data.AllSeries) { s.WriteSeries(series); } w.WriteEndElement(); } }
public AreaChart(ChartData data) { this.Data = data; }