'How to apply borderWidth to data items in Heatmap using Echarts?

Is there a way to apply border width around data items in heat map Echarts?

I'm trying to create a table like chart with colours applied to each cell based on some condition. like below

enter image description here

Looks like I can use heatmap solution as in below, but I need to apply some border width around the data items. Currently they are all clubbed together.

https://echarts.apache.org/examples/en/editor.html?c=heatmap-cartesian

enter image description here I have gone through the Echarts documentation but haven't found any option to apply borderWidth or some padding around data items.

Any suggestions on this please?



Solution 1:[1]

Try to set border width with styles:

itemStyle: {
  borderWidth: 3
}

Docs: https://echarts.apache.org/en/option.html#series-heatmap.itemStyle.borderWidth

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sergey Fedorov