Hi, I liked chart.js lib and wanted to use it in my React-based app, but I need to support IE8. So, I decided to use excanvas polyfill. It's not a problem to use it with chart.js itself, so it working like this in my app:
Rendering empty canvas:
And then initializing excanvas (which is loaded only in IE8 by conditional tags) and rendering chart into empty canvas:
componentDidMount() {
if (typeof G_vmlCanvasManager !== 'undefined') {
G_vmlCanvasManager.initElement(this.refs.canvas);
options.animation = false;
}
let ctx = this.refs.canvas.getContext("2d");
let myLineChart = new Chart(ctx).Line(data, options);
}
But chart components from react-chartjs creating canvas elements by itself, so I didn't found a way to initialize an excanvas polyfill. Is it possible to use excanvas with react-chartjs or I should use just a chart.js like now?
Hi, I liked chart.js lib and wanted to use it in my React-based app, but I need to support IE8. So, I decided to use excanvas polyfill. It's not a problem to use it with chart.js itself, so it working like this in my app: Rendering empty canvas:
And then initializing excanvas (which is loaded only in IE8 by conditional tags) and rendering chart into empty canvas:
But chart components from react-chartjs creating canvas elements by itself, so I didn't found a way to initialize an excanvas polyfill. Is it possible to use excanvas with react-chartjs or I should use just a chart.js like now?