T
T
teertsneerg2020-08-20 14:41:17
JavaScript
teertsneerg, 2020-08-20 14:41:17

how to change chartjs timeline?

The X axis is a date in the form "DD.MM.YYYY", everything is displayed ok, but when I try to change the min max values ​​it does not react at all, what am I doing wrong?

let options = {
    responsive: false,
    scales: {
        xAxes: [{
            type: 'time',
            time: {
                parser: 'DD.MM.YYYY',
                unit: 'month',
            },
            tick: {
                max: moment('03.08.2012', 'DD MM YYYY'),
                min: moment('12.12.2013', 'DD MM YYYY')
            }
        }]
    },
    tooltips: {
        intersect: false,
        mode: 'index'
    },
    elements: {
        point: {
            radius: 0,
            hoverRadius: 4,
        },
        line: {
            tension: 0
        }
    },
};

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question