How to format x-axis time scale values in Chart.js v2

Just set all the selected time unit’s displayFormat to MMM DD options: { scales: { xAxes: [{ type: ‘time’, time: { displayFormats: { ‘millisecond’: ‘MMM DD’, ‘second’: ‘MMM DD’, ‘minute’: ‘MMM DD’, ‘hour’: ‘MMM DD’, ‘day’: ‘MMM DD’, ‘week’: ‘MMM DD’, ‘month’: ‘MMM DD’, ‘quarter’: ‘MMM DD’, ‘year’: ‘MMM DD’, } … Notice that I’ve … Read more

Chart.js : straight lines instead of curves

Solution for Version 1 (old charts version) According to documentation on chartjs.org you can set the ‘bezierCurve’ in options and pass it in when you create the chart. bezierCurve: false eg: var options = { //Boolean – Whether the line is curved between points bezierCurve : false }; var myLine = new Chart(document.getElementById(“canvas”).getContext(“2d”)).Line(lineChartData, options); Update … Read more

How to set max and min value for Y axis

For chart.js V2 (beta), use: var options = { scales: { yAxes: [{ display: true, ticks: { suggestedMin: 0, // minimum will be 0, unless there is a lower value. // OR // beginAtZero: true // minimum value will be 0. } }] } }; See chart.js documentation on linear axes configuration for more details.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)