JSFiddle - React, Tailwind, and code Playground
by amrutaJgtp
HTML
<script src="http://code.highcharts.com/highcharts-more.js"></script>
<script src="http://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="height: 400px"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'column',
zoomType: 'xy'
},
title: {
text: 'Salary Of EmployeeByDept from Join Date(MM-YYYY)'
},
xAxis: {
title:{
text:'EmployeeByDept by Join Date'
},
type: 'datetime',
labels: {
format: '{value:%m-%Y}',
rotation: -45,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
},
showFirstLabel: true,
startOnTick: false,
minPadding: 0,
units: [
[
'month', [1,3,6]],
[
'year',
null]
]
},
yAxis: {
title: {
text: 'Salary'
},
min:0
},
scrollbar : {
enabled:true
},
series: [{
data: [
[Date.UTC(2010, 1), 500000],
[Date.UTC(2010, 2), 700000],
[Date.UTC(2010, 3), 700000],
[Date.UTC(2010, 4), 400000],
[Date.UTC(2010, 5), 500000],
[Date.UTC(2010, 6), 400000],
[Date.UTC(2010, 7), 500000],
[Date.UTC(2010, 8), 400000],
[Date.UTC(2010, 9), 500000],
[Date.UTC(2010, 10), 400000],
[Date.UTC(2010, 11), 500000],
[Date.UTC(2010, 12), 400000],
[Date.UTC(2011, 1), 500000],
[Date.UTC(2011, 2), 700000],
[Date.UTC(2011, 3), 700000],
[Date.UTC(2011, 4), 400000],
[Date.UTC(2011, 5), 500000],
[Date.UTC(2011, 6), 400000],
[Date.UTC(2011, 7), 500000],
...