Pre loader

Chart printing

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies