Highcharts Demo
author(s): Torstein Hønsi
by Black Label
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/pattern-fill.js"></script>
<div id="container"></div>
<button id="add-series">
Add series
</button>
JavaScript
const chart = Highcharts.chart('container', {
chart: {
type: 'column',
events: {
load: function() {
this.addSeries({
data: [3, 2, 1, 5, 4, 6],
visible: false
});
this.series[0].update({
color: {
patternIndex: 0
}
});
this.reflow();
}
}
},
series: [{
data: [1, 2, 3, 5, 6, 4]
}]
});