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
- Saksham Jaiswal asked 4 months ago
- You must login to post comments
Yes will be reusing the same result throughout our app,thnks for your suggestion
- Saksham Jaiswal answered 4 months ago
- You must login to post comments
Thnks a lot for that this was really helpful
Regards
Saksham
- Saksham Jaiswal answered 4 months ago
- 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 login to post comments
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:
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
- Andrew Burnett-Thompson answered 4 months ago
- last edited 4 months ago
- You must login to post comments
Please login first to submit.