title: How to set time scale zoom in ChartJS?
body: <p>I have following example data for a line chart: </p>
  
  <pre><code>[
   {
     x: 'Mon Sep 29 2018 14:26:53 GMT+0100',
     y: 100
   },
   {
     x: 'Mon Oct 15 2018 10:40:31 GMT+0100',
     y: 400
   }
  ]
  </code></pre>
  
  <p>My goal is to set a certain time frame as default and change it's range and zoom dynamically. If there is no data to show, it's fine. </p>
  
  <p>I'm using the <a href="https://github.com/chartjs/chartjs-plugin-zoom" rel="noreferrer">chartjs-plugin-zoom</a> which allows me to <strong>pan</strong> freely on the x axis which is very good. Unfotunately the <strong>zoom</strong> is set on user events via this plugin. </p>
  
  <p>Basically I want to have buttons to switch between time scalings and then pan on the x axis.</p>
  
  <p>My question is, do I need to set the "limits" in ChartJS itself and let the plugin only pan? If yes, how to do this "freely" not considering the data (ChartJS tries to fit all data in the view, correct me if I'm wrong)</p>
  
  <p>I tried the zoom options on the plugin, but they do not seem to affect anything:</p>
  
  <pre><code>zoom: {
          enabled: true,
          drag: false,
          mode: '',
          rangeMin: {
              x: moment().format(),
              y: null
          },
          rangeMax: {
              x: moment().add(7, 'day').format(),
              y: null
          }
      }
  </code></pre>
  
  <p>Thank you!</p>