JSFiddle - React, Tailwind, and code Playground
by sujay
HTML
<div id="chart-container"></div>
<script src="http://sujaykrishna.github.com/HighCharts-Stock-for-Numeric-xAxis/highstock.js">
</script>
JavaScript
$(function() {
if (typeof Highcharts !== "undefined" && typeof Highcharts.StockChart !== "undefined") {
console.log('inside condition');
chart = new Highcharts.StockChart({
chart : {
renderTo : 'chart-container',
type : 'line',
marginTop : 130
},
xAxis : {
type : 'linear',
ordinal : false,
min : 0,
max : 1100,
range : 500
},
rangeSelector : {
enabled : false
},
plotOptions : {
line : {
lineWidth : 2,
dataGrouping : {
enabled : false
}
}
},
title : {
text : 'Test Numeric Series',
marginBottom : 10,
marginTop : 10
},
tooltip : {
shared : true,
yDecimals : 2
},
navigator : {
xAxis : {
type : 'linear'
},
series : {
dataGrouping : {
enabled : false
}
}
},
legend : {
enabled : true,
verticalAlign : "top",
y : 40,
marginBottom : 15
},
credits : {
enabled : false
},
series : [
{
"name" : "Jan 2012 Offpeak- Nov-Mar 2012 Offpeak",
"data" : [ [ 0, 432.6026611328125 ],
[ 1, 364.0066223144531 ],
[ 2, 360.3642272949219 ],
[ 3, 292.5827941894531 ],
[ 4, 314.3509826660156 ],
...