JSFiddle - React, Tailwind, and code Playground
by linhpham84
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container"></div>
CSS
#container {
min-width: 300px;
max-width: 800px;
height: 300px;
margin: 1em auto;
}
JavaScript
const a = [...Array(100)].map(() => Math.random())
const o = [...Array(100)].map(() => ({ y: Math.random() }))
const b = [...Array(10)].map(() => ({ y: Math.random() }))
const options = {
plotOptions: {
series: {
turboThreshold: 10 // Comment out this code to display error
}
},
series: [{
// In order to use array of objects you have to change turboThreshold
// value from default 1000 to bigger one or disable it passing 0
data: o,
type: 'line',
turboThreshold: 100
},
{
// In order to use array of objects you have to change turboThreshold
// value from default 1000 to bigger one or disable it passing 0
data: a,
type: 'line'
},
{
// In order to use array of objects you have to change turboThreshold
// value from default 1000 to bigger one or disable it passing 0
data: b,
type: 'line'
}]
}
const chart = Highcharts.chart('container', options)