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:SS)'
},
xAxis: {
title:{
text:'EmployeeByDept by Join Date'
},
type: 'datetime',
labels: {
format: '{value:%d-%m-%Y %H:%M:%S}',
rotation: -45,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
},
showFirstLabel: true,
startOnTick: false,
minPadding: 0,
units: [
[
'second', [1, 2, 5, 10, 15, 30]],
[
'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,1), 500000],
[Date.UTC(2010, 1, 1,0,2,3), 500000],
[Date.UTC(2010, 1, 1,0,2,4), 500000],
[Date.UTC(2010, 1, 1,0,2,5), 500000],
[Date.UTC(2010, 1, 1,0,2,6), 500000],
[Date.UTC(2010, 1, 1,0,2,10), 500000],
[Date.UTC(2010, 1, 1,0,2,12), 500000],
[Date.UTC(2010, 1, 1,0,2,15), 500000],
[Date.UTC(2010, 1, 1,0,2,20), 500000],
[Date.UTC(2010, 1, 1,0,2,24), 700000],
...