Group: Forum Members
Last Active: 10 Years Ago
Posts: 3,
Visits: 11
|
I need export chart, i found this code using (NChartControl chartControl = new NChartControl()) { Nevron.Serialization.NSerializer serializer = new Nevron.Serialization.NSerializer(); MemoryStream memStream = new MemoryStream(); serializer.SaveToStream(nChartControl1.Charts[0], memStream, Nevron.Serialization.PersistencyFormat.Binary, null); memStream.Seek(0, SeekOrigin.Begin); Type panelType = nChartControl1.Charts[0].GetType(); Nevron.Chart.NChart chart1 = (Nevron.Chart.NChart)serializer.LoadFromStream(panelType, memStream, Nevron.Serialization.PersistencyFormat.Binary, null); chartControl.Panels.Clear(); //chart.Dock = DockStyle.Fill; chartControl.Panels.Add(chart1); chartControl.ImageExporter.CopyToClipboard(new NSize(200, 200), NResolution.ScreenResolution, new NBitmapImageFormat()); }
chartControl.ImageExporter always null nChartControl.ImageExporter also null I use .NET 4.0
|