Highcharts Demo
author(s): Torstein Hønsi
by ideazgeni
HTML
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="max-width: 800px"></div>
<button id="point-update">Update max data point</button>
JavaScript
var chart = Highcharts.chart('container', {
title: {
text: 'Y axis softMax is 100'
},
subtitle: {
text: 'Click the button to change data max'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
type: 'logrithmic',
softMin: 0,
title: {
text: 'Percentage'
}
},
series: [{
data: [12, 1, 12, 2, 3, 5, 8, 5, 15, 14, 25, 54]
}]
});
var toggle = false;
$('#point-update').click(function () {
chart.series[0].points[11].update((toggle = (!toggle)) ? 120 : 54);
});