5

How can I remove the duplicates from x axis labels in heatmap apexcharts Here the JSFiddle Link click here

enter image description here

Here multiple May months are showing I need to display only one in the Middle of 4 columns. I tried the below

xaxis: {
           labels: {showDuplicates: false}
         }

But this is not working as expected.

user1187
  • 2,116
  • 8
  • 41
  • 74
  • I suspect that the showDuplicates options is only for [datetime series](https://apexcharts.com/docs/datetime/) axis (from the [docs](https://apexcharts.com/docs/options/xaxis/#showDuplicates):"prevent congested values in datetime series"). An alternative approach to prevent duplicates with a heatmap might be to remove any duplicates before passing the series to ApexCharts. – Oscar Schafer Feb 02 '21 at 18:38

1 Answers1

5

We need to add the x axis like below and change the x axis value to a date

xaxis: {
                type: "datetime",
                labels: {
                format: 'MMM',
                showDuplicates: false}
              }

JSFiddle

user1187
  • 2,116
  • 8
  • 41
  • 74