SaveToFile method

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
itz_me_cheyi
Posts: 12
Joined: Wed Oct 02, 2013 6:26 am

SaveToFile method

Post by itz_me_cheyi » Wed Jan 08, 2014 8:51 am

Hi there,

I need to save the chart as image file and i have done this by calling SaveToFile method on the chart. But, sometimes this method returns false value and no image rendered. Could you please tell me what condition will make the image not rendered?

Thank you,

Syarli

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: SaveToFile method

Post by ArctionPasi » Wed Jan 08, 2014 10:27 am

Hi Syarli,

Which image extension are you using? Note that emf, wmf and svg are only available in ViewXY, not in Polar or 3D views.

Also if you could tell more specifications of your system: graphics adapter type, Windows version.
LightningChart Support Team, PT

itz_me_cheyi
Posts: 12
Joined: Wed Oct 02, 2013 6:26 am

Re: SaveToFile method

Post by itz_me_cheyi » Thu Jan 09, 2014 1:32 am

Hi,

I am trying to export the ViewXY chart as .JPG file. I am using Intel(R) HD Graphics and Windows 7 Professional 64 bit.

Is there any problem with my environment?

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: SaveToFile method

Post by ArctionPasi » Thu Jan 09, 2014 1:10 pm

We tested with similar system. Worked perfectly.

Only cases where we could reproduce the problem are the following:
- You are using an existing file name
- You are calling SaveToFile from a background thread, and forgot to use Dispatcher.Invoke to synchronize the background thread method call in UI thread.
LightningChart Support Team, PT

itz_me_cheyi
Posts: 12
Joined: Wed Oct 02, 2013 6:26 am

Re: SaveToFile method

Post by itz_me_cheyi » Mon Jan 13, 2014 2:28 am

We have found the cause.
We use background thread to load the graph and the image is not rendered because the graph has not been loaded completely.

Thank you for your help.

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: SaveToFile method

Post by ArctionPasi » Mon Jan 13, 2014 6:39 am

Glad to hear that :D
LightningChart Support Team, PT

Post Reply