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 (DD-MM-YYYY HH:MM)'
},
xAxis: {
title:{
text:'EmployeeByDept by Join Date'
},
type: 'datetime',
labels: {
format: '{value:%d-%m-%Y %H:%M}',
rotation: -45,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
},
showFirstLabel: true,
startOnTick: false,
minPadding: 0,
units: [
[
'minute', [1, 2, 5, 10, 15, 30]],
[
'hour', [1, 2, 3, 4, 6, 8, 12]],
[
'day', [1, 10]],
[
'month', [1, 3, 6]],
[
'year',
null]
]
},
yAxis: {
title: {
text: 'Salary'
},
min:0
},
scrollbar : {
enabled:true
},
series: [{
data: [
[Date.UTC(2010, 1, 1,0,2), 500000],
[Date.UTC(2010, 1, 1,1,10), 700000],
[Date.UTC(2010, 1, 1,1,15), 700000],
[Date.UTC(2010, 1, 1,1,20), 700000],
[Date.UTC(2010, 1, 1,1,21), 700000],
[Date.UTC(2010, 1, 1,1,22), 700000],
[Date.UTC(2010, 1, 1,1,23), 700000],
[Date.UTC(2010, 1, 1,1,24), 700000],
[Date.UTC(2010, 1, 1,1,25), 700000],
[Date.UTC(2010, 1, 1,1,28), 700000],
[Date.UTC(2010, 1, 1,1,30), 700000],
[Date.UTC(2010, 1, 1,3,12), 700000],
...