SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

1
0

I have basic printing working based on the XPS printing walkthrough. However the legend does not show. I’m not sure what to do about that. Any ideas on how to handle that?

  • You must to post comments
0
0

Hi David,

The Legend needs to be in the visual tree of the SciChartSurface in order for SciChartSurface.ExportToBitmapSource() to export it. There are several ways to achieve this:

  1. Include SciChartLegend inside the visual tree of the SciChartSurface by using our LegendModifier.ShowLegend=”True” API.
  2. Include SciChartLegend inside the visual tree of the SciChartSurface by using a CustomAnnotation to host a SciChartLegend control
  3. Export a control higher up the visual tree (e.g. a Grid which contains both SciChartSurface and SciChartLegend) using the WPF RenderToBitmap feature.

I would personally recommend (1) as this is our supported API for printing a legend, and the easiest to achieve, but any of them will work!

For more info on the LegendModifier and SciChartLegend API see here.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.