Mick Posted March 22, 2010 Report Share Posted March 22, 2010 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 Quote Link to comment Share on other sites More sharing options...
JuanC Posted March 22, 2010 Report Share Posted March 22, 2010 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 Quote Link to comment Share on other sites More sharing options...
Mick Posted March 30, 2010 Author Report Share Posted March 30, 2010 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 Quote Link to comment Share on other sites More sharing options...
JuanC Posted March 30, 2010 Report Share Posted March 30, 2010 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.