I tried to create apexchart heatmap. All example on the page shows various “name” in series. But I have a list of values [[x,y,value],[x,y,value]] … but the values is not categoriesed on the yaxis. Does anyone know how to handle this?
thanks in advance.
best regards
var options = {
series: [{
data: [[2012,2012,20],[2012,2013,20],[2012,2014,20],[2013,2012,0],[2013,2013,30],[2013,2014,25]],
}],
xaxis: {
categories: [2012,2013,2014]
},
yaxis: {
categories: [2012,2013,2014]
},
chart: {
height: 350,
type: 'heatmap',
},
plotOptions: {
heatmap: {
shadeIntensity: 0.5,
radius: 0,
useFillColorAsStroke: true,
colorScale: {
ranges: [{
from: -30,
to: 5,
name: 'low',
color: '#00A100'
},
{
from: 6,
to: 20,
name: 'medium',
color: '#128FD9'
},
{
from: 21,
to: 45,
name: 'high',
color: '#FFB200'
},
{
from: 46,
to: 55,
name: 'extreme',
color: '#FF0000'
}
]
}
}
},
dataLabels: {
enabled: false
},
stroke: {
width: 1
},
title: {
text: 'HeatMap Chart with Color Range'
},
};
var chart = new ApexCharts(document.querySelector("#chart"), options);
chart.render();