Nevron Chart .NET for WPF


https://www.nevron.com/Forum/Topic8612.aspx
Print Topic | Close Window

By s s - 10 Years Ago
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
By Nevron Support - 10 Years Ago
Hi,

We just tested the code below and it was working properly - what is the version of the control you're testing with? Can you post the code that originally configures the chart for review?
By s s - 10 Years Ago
Please see this project. nChartControl.ImageExporter equal null
By Nevron Support - 10 Years Ago

Hi,
Thanks for posting the project - we managed to replicate the bug and the fix will be available in a SP we'll publish by the end of the week.

By s s - 10 Years Ago
Thank you very much!