title: How to dynamically change the x-axis in ApexCharts to dates?
body: <p>How do I dynamically change the max value of the x-axis to today's date? and the min value up to 15 weeks ago? How can change the x-axis to dynamically do this?</p>
  <pre><code>chart:{
      animations:{
          enabled: false,
      },
      toolbar: {
          show: false,
      },
      height:450,
      width: '100%',
      type: 'bar',
      background:'#ffffff',
      forColor: '#333'
  },
  series:[{
      name:'Calories',
      data:[80,81,83,85,82,89,90]
          }],
  dataLabels:{
      enabled:false
  },
  markers: {
      size:0,
  },
  xaxis:{
      type: 'datetime',
        categories: [
           sevenWeeksBack,date
        ],
      // datetimeUTC:true,
      // datetimeFormatter:{
      //     year: 'yyyy',
      //     month:&quot;Mmm&quot;,
      //     day: &quot;dd&quot;
      // },
      //   labels:{
      //       show:true,
      //   },
      //min: new Date(sevenWeeksBack).getTime(),
       //max: new Date().getTime(),
       //range: new Date(sevenWeeksBack).getTime(),
      // min:new Date(Date.now()-604800000),
       // tickAmount: 'dataPoints' 
  },
  yaxis:[{
          title:{
              text: ''
          }
  }],
  plotOptions:{
      bar:{
      horizontal: false
      }
  },
  fill:{
      colors: ['#33e400']
  },
  title:{
      text: 'Food Calories',
      align: 'left',
      margin: 20,
      offsetY: 20,
      style:{
          fontSize: '25px'
      }
  },
  tooltip: {
      enabled:false,
      x: {
          format: 'dd MMM yyyy'
        }
    },
    states: {
      hover: {
          filter: {
              type: 'none',
          }
      }
  }
  </code></pre>
  <p>};</p>
  <p>The incoming data will contain up to 90 days of worth of data (90 values).
  How can I display the x-axis to do dates?</p>
  <p>This chart is intended to display up to 90 days. I have tried using momentjs to dynamically change the max and min value but with no success</p>