Pre loader

Closing and collapsing a chart

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

Hello everyone. A similar question has already been asked just below the forum, but there is no answer. I have dynamically added diagrams. However, I am interested in the possibility of adding buttons for closing and collapsing diagrams directly to the chart panel. I need the option to close any selected chart. How can this be implemented and written? Thank you.

Version
last
  • You must to post comments
0
0

We don’t have a demo of this yet, but it is very simple

  • Add a button to your application
  • In the onClick handler, call sciChartSurface.delete().
  • Make sure that sciChartSurface.domChartRoot is removed from your HTML DOM

Code might look like this:

button.onClick = () => {
    sciChartSurface.delete(true);
    sciChartSurface.domChartRoot.remove();
}

If you have other subscriptions, synchronisations or event handling make sure you cleanup those too.

Best regards
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.