ChartJS zoom/pan limits

Viewed 716

I have line chart with time axe. I need to limit min zoom on my time interval, to be able zoom in and not zoom out range.

       zoom: {
          enabled: true,
          // drag: true,
          mode: 'x',
          rangeMin: {
            // Format of min zoom range depends on scale type
            x: this.buildDataets(val)[0]['data'][0]
          },
          rangeMax: {
            // Format of max zoom range depends on scale type
            x: this.buildDataets(val)[0]['data'][4]
          },

        },

I tryed to get my first and last date to range zoom but it doesn't work.

0 Answers
Related