JSFiddle - React, Tailwind, and code Playground
by hfrntt
HTML
<script src="http://highcharts.com/js/testing.js"></script>
<div id="test"></div>
<div id="container" style="height: 400px"></div>
JavaScript
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column',
animation: false
},
xAxis: {
categories: ['one', 'two', 'three', 'four'],
min: 0,
max: 7,
minPadding: 0,
maxPadding: 0,
allowDecimals: false,
},
series: [{
animation: false,
data: [[0, 29.9], [2, 71.5], [3, 106.4], [4, 129.2], [5, 144.0] ],
}]
}, function(chart) {
setTimeout(function(){
var screen0 = chart.xAxis[0].translate(0, false);
$('#test').html('chart: 0-> screen -> chart: ' + chart.xAxis[0].translate(screen0, true));
console.log(screen0);
}, 1500);
});