I'm trying to create interactive Charts with charts.js. Unfortunately I could not bring it to work with Firefox 93 in Ubuntu 20.04. With Chrome everything works as expected.
Example
<html>
<head>
<!-- <script type="text/javascript" src="chart.js"></script> -->
<script src="https://www.chartjs.org/dist/master/chart.js"></script>
<script>
function createChart() {
try {
const ctx = document.getElementById('myChart');
var myChart = new Chart(ctx, {
type: "doughnut",
data: {
datasets: [{
data: [2, 6],
borderColor: [
'green',
'red'
]
}]
},
options: {
responsive: false,
maintainAspectRatio: false
}
});
}</script>
</head>
<body onload="createChart()">
<canvas id="myChart"></canvas>
</body>
</html>
Everytime an Exception occurs:
Uncaught DOMException: An exception was thrown chart.js:1348
clipArea https://www.chartjs.org/dist/master/chart.js:1348
draw https://www.chartjs.org/dist/master/chart.js:10282
....