Fix Chart Dumping.
Currently, the only way to display and update a chart in a DumpContainer is to call chart.ToBitmap() and set the DumpContainer's content to the bitmap. This is workable, but the call to ToBitmap (which in turn calls ToWebChart) overrides many of the attributes of the underlying chart (color palette, axis intervals, etc.). This severely limits the configurability of the charting function.
I know that one solution is to use ToWindowsChart(), modify the attributes that I want to change, and then dump the Windows Chart, but this opens up another visualizer. I'd like to just be able to set the Content of a DumpContainer to the chart, and have it display in my current visualizer. If I try to add the Windows Chart object to the DumpContainer, I see the object model for the Windows Chart, not the chart itself.
This is completed in 6.12.2. There’s now an extension method called .ToBitmap() on the Windows Forms Chart type.
-
Michael Sisco commented
Thanks, Joe. Works like a dream!