Category / Section
How to make axis labels to display on month intervals in date-time axis
2 mins read
This article explains how to make axis labels display at month intervals on a date-time axis.
In the HeatMap chart, using the showLabelOn property, it is possible to display the axis labels exactly on specific time intervals in date-time axis. The following are the axis label display types available in the HeatMap chart:
- None: Displays axis labels for each data point in the axis.
- Years: Displays axis labels at every year interval.
- Months: Displays axis labels at every month interval.
- Days: Displays axis labels at each day interval in the date-time axis.
- Hours: Displays axis labels for every hour.
The following code snippet explains how to define the axis label display type for the heatmap axis.
var heatmap = new ej2_heatmap_1.HeatMap({
xAxis: {
showLabelOn: 'Months',
labelFormat: 'MMM/dd',
labelIntersectAction: 'Rotate45'
},
}, '#element');
The following screenshot depicts a HeatMap chart defined with showLabelOn property as month for x-axis.

Refer to the sample link for more details.