简体   繁体   中英

how can I display time using ApexCharts?

I know the ApexCharts can help to display data using timeline chart. but the example(vue) only shown how to display the date like

new Date(1797, 2, 4).getTime(),
new Date(1801, 2, 4).getTime() ```

how can I change the value to display time? like 08:00-09:00

You can create your own x-axis labels in the dataset using the chart's xaxis categories option.

For example:

options: {
  chart: {
    id: 'mychart'
  },
  xaxis: {
    categories: ['8:00','9:00','10:00','11:00','12:00','1:00','2:00','3:00']
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM