[Chartjs]-Setting a dynamic min and max date in CHARTJS using date-fn adapter

1👍

you can just pass a function to the min and max that calculates the min and max for you like so:

options: {
  scales: {
    x: {
      type: 'time',
      min: () => {
        return calculateMin()
      }
    }
  }
}

Leave a comment