javascript - Make Chart.js not extend beyond X axis min and max -
i use chart.js draw area chart.
options of x-axis following:
xaxes: [{ type: "time", gridlines: { color: "#dcdcdc" }, time: { unit: "month", unitstepsize: 1, displayformats: { "month": "mm.yyyy" } }, ticks: { autoskip: false, min: mindate, max: maxdate, padding: 0, maxrotation: 0, minrotation: 0 } }] however, chart.js extends x-axis beyond min , max restrictions if there data takes part of month. "rounds" x axis closest full month make tick.
for instance, if have january, 31 in data, chart starts january, 1. if remove january, 31 data, starts february, 1, expected.
data[0] january, 31; mindata january, 31: 
data[0] february, 1; mindata february, 1: 
how make strictly start min date? expect start january, 31 , start draw tick little right.
Comments
Post a Comment