2.7 start/end skewed
by andig2
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.bundle.min.js"></script>
<canvas id="myChart" width="400" height="200"></canvas>
JavaScript
var canvas = document.getElementById('myChart');
var config = {
"type": "bar",
"data": {
"datasets": [{
"type": "bar",
"yAxisID": "axis3",
"xAxisID": "axis-bar",
"data": [118229, 149441, 148710, 247691, 470189, 337572, 312514, 221522, 175604, 139421, 117159, 96268, 14683]
}],
"labels": ["x", "x", "x", "x", "x", "x", "x", "x", "x", "x", "x", "x", "x"]
},
"options": {
"scales": {
"xAxes": [{
"type": "category",
"id": "axis-bar",
"gridLines": {
"offsetGridLines": true
}
}, {
"type": "time",
"id": "axis-time",
"time": {
"min": 1467324000000,
"max": 1501538400000
}
}],
"yAxes": [{
"id": "axis3",
"position": "right",
"gridLines": {
"drawOnChartArea": false
},
"scaleLabel": {
"display": true,
"labelString": "Wh"
}
}]
}
}
};
var myBarChart = Chart.Bar(canvas, config);