Pre loader

Throwing errors when hardware acceleration is not not enabled

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

When hardware acceleration is not enabled from the client side i am getting the follwong error in the console and the chart becomes empty.
Can we have a caetain fallback ui for this error so that when hardware acceleration is disabled we can show some error in the client side instead of frozen screen

Version
3.0.280
Images
  • You must to post comments
1
0

Hi Saksham,

At the moment SciChart.js requires either WebGL 1 or 2 in the browser, there is no way to use SciChart without hardware acceleration.

Find out what browsers are supported in our documentation page:

Minimum Browser Requirements

SciChart.js is a cutting-edge next-generation JavaScript Chart Library. As a result, we are using the latest technologies to draw our fast, real-time and interactive JavaScript charts.

Minimum requirement for deployment of an application with SciChart.js is your browser must support WebAssembly (wasm) and WebGL 1 (preferably WebGL 2).

A full table of which browsers are supported can be found at the caniuse.com website.

The good news is, 97.94% of browsers support at least WebGL 1 and this number is increasing all the time.

To detect if WebGL is supported, you can add some code similar to this to your application.

function webgl_support () { 
   try {
    var canvas = document.createElement('canvas'); 
    return !!window.WebGLRenderingContext &&
      (canvas.getContext('webgl') || canvas.getContext('experimental-webgl'));
   } catch(e) {
     return false;
   }
 };

If this function returns false then don’t display a SciChart.js chart, but instead an error message.

We could show a better error message than the above in SciChart.js if webgl is not found. I’m going to add a low priority task to our backlog for this. In the meantime, please use the workaround above.

Best regards,
Andrew

  • You must to post comments
1
0

Thnks a lot for that this was really helpful
Regards
Saksham

  • Andrew Burnett-Thompson
    No worries. Be aware of WebGL context limits. 16 per browser (chrome), 2 per browser on mobile. I would suggest you do the webgl check once on app startup then re-use the result.
  • You must to post comments
0
0

Yes will be reusing the same result throughout our app,thnks for your suggestion

  • You must to post comments
Showing 3 results
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