Pre loader

SciChartMasterCanvas

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. I noticed that a canvas appears in the DOM tree, which completely duplicates the main chart, but it is set to display: none.

can i ask what it is used for? does it affect performance? and can i remove it?

Version
3.1.333
Images
  • You must to post comments
1
0

Hi there,

SciChart.js by default is optimised for multiple charts on a page. This element is present in the DOM when you use SciChartSurface.create() to instantiate a chart surface. If you want to remove it, you can use SciChartSurface.createSingle() instead. We don’t recommend removing it yourself or library won’t work correctly.

Our Performance Tips & Tricks page has some details on SciChartSurface.create() vs. SciChartSurface.createSingle() and the benefits of the two approaches.

Use One WebGL Context per SciChartSurface

The function SciChartSurface.create() uses a single shared WebGL context for all chart surfaces. This allows us to have multiple charts (up to hundreds of charts) in a single webpage.

The function SciChartSurface.createSingle() creates one WebGL Context per SciChartSurface. This gives faster drawing performance but will quickly hit the limit of WebGL contexts in a webpage.

Approximate WebGL Context Limits per browser can be found here.

Individual WebGL contexts per SciChartSurface will give faster performance than a shared WebGL context. This is more noticeable in FireFox than Chrome which performs very well for shared WebGL contexts.

Let me know if this answers your question,

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.