Pre loader

After upgrading the Scichart.charting.dll from 4.2.4.10393 to 8.3.0.28019

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hi team,
I have upgraded dll as mentioned above. While exporting the image both x and y axes are deviating from it’s position. I have attached export1.png image for your reference .
The deviation is happening only when we use Window.Show().

We are using this to generate the report. so we are using window.show().after exporting the image we are closing the window using Window.close()

If we use Window.ShowDialog() exporting as png is working fine. But in our use case we cant use showDialogue, coz here user need to close the window while generating the report.

Before upgrading the Dll, it’s working fine.

I have attached sample code for your reference(SampleCode.txt).
Under Mainwindow.xaml consists two button’s
One button to export png using show window – Here x axes values are deviating as shown in the export1.png
another button to export png as Show Dialogue window. – Here X axes value are plotting correctly

Chart.xaml will use to draw the chart.

Thanks and Regards
Hemanth Patel BS

Version
8.3.0.28019
Attachments
Images
  • Lex
    • Lex
    • 2 months ago
    Hi Vishruth, Thanks for your inquiry. We are going to investigate the provided sample project on our side and will get back to you as soon as we have an update. With best regards, Lex S., MSEE, SciChart Technical Support Engineer
  • You must to post comments
0
0

Hi Vishruth,

Hope you are doing well.
I’m glad to inform you that our developers have investigated the reported issue and offered the following solution:

To be able to render a chart in the background you need to set Width and Height for the chart control.

public void ExportToPngShow(Size size)
{
    sciChart.Width = size.Width;
    sciChart.Height = size.Height;
    sciChart.ExportToFile("PathToImage", ExportType.Png, false);
}

There is also no need to call the Show() or ShowDialog() method when you set the Width and Height for the SciChartSurface. Please find the modified example project attached.

You can also find the following example published in our Sandbox useful:
https://github.com/ABTSoftware/SciChart.Wpf.Examples/tree/master/Sandbox/CustomerExamples/OffScreenExportExample

With best regards,
Lex S., MSEE
SciChart Technical Support Engineer

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.