Jump to content
Software FX Community

Chart export resolution


Mick

Recommended Posts

Is there any way to export a chart at different resolutions? I think the default is 72 or 96, but I want something higher, like 300.

There is an overload to the method that seems like it might work, but it is not documented in the help file:

Chart.Export(FileFormat format, Stream stream, object settings).

Thank you,

Mick


Link to comment
Share on other sites

The bad news is that current builds are hardcoded to use 96 dots per inch.

The good news is that as you already noted, there is an Export overload that receives a settings object. You can use an object of type ExportImageSettings to customize the image generation process (sorry for the lack of docs), builds marked 3733 or later will support a DPI property to allow you to change the image resolution.

The change is very small so the new build should be available in a day or two.

JuanC

Link to comment
Share on other sites

  • 2 weeks later...

 Is this feature in 8.0.3733.27808?

Where would I look for it?

I looked here:

(new Chart()).DPI // <- not here

(new Chart()).Export(FileFormat.Png, new MemoryStream(), 300); // <- Not here

---

As an alternative, you stated that the ExportImageSettings can customize the image generation process. How would I use this in the mean time if the DPI is not there yet?

Thank you,

Mick

Link to comment
Share on other sites

You need something like

ExportImageSettings settings = new ExportImageSettings();

settings.DPI = 300;

and then use settings as the last parameter in the Export call that receives an extra object parameter. The class ExportImageSettings existed before but the DPI member was added in build 3733

JuanC

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...