echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Feature] Could you add a feature to adjust heatmap cell size?

Open kongemom1215 opened this issue 1 year ago • 1 comments

What problem does this feature solve?

Hello, I’m using Heatmap with Echarts. I set the x,y coordinates to type:value and use a heatmap, but the cell size is fixed to 1 both horizontally and vertically. Is there a function to adjust width and height? If not, can you please apply it? I desperately need it.. 😂😂

What does the proposed API look like?

option = { grid: { height: ‘50%’, width: ‘40%’, top: ‘10%’, left: ‘30%’, }, xAxis: { type:’value’, splitArea:{ show:true }, splitNumber: 1 }, yAxis: { type:’value’, splitArea:{ show:true }, splitNumber: 1 }, series: [ { name: ‘Field’, type: ’heatmap’, coordinateSystem:’cartesian2d’, itemStyle: { color:’#ffdddd’, borderWidth:1, borderColor:’#000’ }, data: [[0.5,0.5,0.5],[-0.5,-0.5,-0.5]] } ] };

kongemom1215 avatar Dec 12 '24 04:12 kongemom1215

You could use 'value' axis only for visuals, setting min / max such that it fits your scale and use an invisibe 'category' axis to place the data on.

Example

MatthiasMert avatar Dec 12 '24 07:12 MatthiasMert