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(2 weeks)'
},
xAxis: {
title:{
text:'EmployeeByDept by Join Date'
},
type: 'datetime',
labels: {
format: '{value:%d-%m-%Y}',
rotation: -45,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
},
showFirstLabel: true,
startOnTick: false,
minPadding: 0,
units: [
[
'week', [2]],
[
'month', [1, 3, 6]],
[
'year',
null]
]
},
yAxis: {
title: {
text: 'Salary'
},
min:0
},
scrollbar : {
enabled:true
},
series: [{
data: [
[Date.UTC(2010, 1, 1), 500000],
[Date.UTC(2010, 1, 2), 700000],
[Date.UTC(2010, 1, 10), 700000],
[Date.UTC(2010, 1, 15), 400000],
[Date.UTC(2010, 1, 21), 500000],
[Date.UTC(2010, 2, 1), 700000],
[Date.UTC(2010, 2, 10), 700000],
[Date.UTC(2010, 2, 18), 400000],
[Date.UTC(2010, 2, 28), 500000],
[Date.UTC(2010, 3, 1), 700000],
[Date.UTC(2010, 3, 10), 700000],
[Date.UTC(2010, 3, 11), 400000],
[Date.UTC(2010, 3, 29), 700000],
[Date.UTC(2010, 4, 10), 700000],
[Date.UTC(2010, 4, 27), 400000],
[Date.UTC(2010, 5, 1), 500000],
...