Chartjs-Chart.js How to get min-max values of X axis?

0👍

This is Ok, Maby

zoom: {
        zoom: {
            enabled: true,
                mode: 'x',
                    onZoom: function () {
                        var minVal = myChart[i].getDatasetMeta(i).dataset._scale.chart.scales['x-axis-0']._table[0].time;
                        var maxVal = myChart[i].getDatasetMeta(i).dataset._scale.chart.scales['x-axis-0']._table[1].time;
                        console.log('minVal', minVal);
                        console.log('minVal', minVal);
                    }
        }
    }

Leave a comment