0👍
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']
}
}
- [Vuejs]-How to retrieve element from the local storage in Vuejs?
- [Vuejs]-Quasar q-tabs: how to dynamically show/hide q-tab by code?
0👍
Use the formatter
on the axis: https://apexcharts.com/docs/options/xaxis/. It isn’t exactly the format you asked for, but will set you in the right direction. There are getMinutes() getSeconds() and GetHours() among other functions that can be used to then construct a format you want.
xaxis: {
type: 'datetime',
labels: {
formatter: function (val: number) {
return new Date(val).toLocaleTimeString()
}
}
},
- [Vuejs]-How can i add / change multiple select option dynamically usign vuejs from same form
- [Vuejs]-How to reuse the vuex module for other components?
Source:stackexchange.com