JSFiddle - React, Tailwind, and code Playground
by kasinaat007
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="height: 400px"></div>
JavaScript
function log10(n) {
if(n==1)
return 0.1;
return Math.log(n)/Math.log(10);
}
$('#container').highcharts({
chart: {
type: 'column',
},
title: {
useHTML:true,
width:20,
text: '<span> </span>'
},
yAxis: {
type:'logarithmic',
title: {
text: "yAxisTitle"
},
labels: {
/* formatter: function() {
return Math.round(Math.pow(10,this.value));
} */
}
},
credits: {
enabled: false
},
plotOptions: {
column: {
stacking: 'normal'
},
},
/* tooltip: {
formatter: function() {
if(this.y ==0.1 ){
return '' + this.series.name + ': ' + '1' + ' millions';
}
return '' + this.series.name + ': ' + Math.round(Math.pow(10,this.y)) + ' millions';
}
}, */
series: [{
//data:[log10(10),log10(2),log10(3)]
data:[0,0,0],pointStart:1
},
{
// data:[log10(1),log10(2),log10(3)]
data:[1,2,0],pointStart:1
},
{
// data:[log10(1),log10(2),log10(3)]
data:[3,2,1],pointStart:1
}
]
});