echarts icon indicating copy to clipboard operation
echarts copied to clipboard

Setting fixed size of cells in cartesian heatmap

Open janz1 opened this issue 8 years ago • 7 comments

One-line summary [问题简述]

Setting fixed size of cells in cartesian heatmap

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 3.0
  • Browser version [浏览器类型和版本]: Any
  • OS Version [操作系统类型和版本]: Any

Now, size of the whole chart is fixed, so the more values on the chart I have, the smaller each cell/square is. Is there a way to change that?

ECharts option [ECharts配置项]

option = {
tooltip: {
        position: 'top'
    },
    animation: false,
    grid: {
        height: '50%',
        y: '10%'
    },
    xAxis: {
        type: 'category',
        data: hours
    },
    yAxis: {
        type: 'category',
        data: days
    },
    visualMap: {
        min: 1,
        max: 10,
        calculable: true,
        orient: 'horizontal',
        left: 'center',
        bottom: '15%'
    },
    series: [{
        name: 'Punch Card',
        type: 'heatmap',
        data: data,
        label: {
            normal: {
                show: true
            }
        },
        itemStyle: {
            emphasis: {
                shadowBlur: 10,
                shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
        }
    }]
};

Other comments [其他信息]

zaznaczenie_186

janz1 avatar Apr 29 '18 13:04 janz1

Hi, any updates for this? Thanks.

tuc74165 avatar Apr 10 '20 17:04 tuc74165

any update?

hereisfahad avatar Jul 09 '21 08:07 hereisfahad

Looking for this too...

KML-projects avatar Sep 23 '21 01:09 KML-projects

There is no strategy to adjust chart size automatically now. You can simply calculate the chart size from the heatmap cells number.

pissang avatar Sep 23 '21 02:09 pissang

any work around or fix for this?

sylvermeister avatar Apr 24 '23 09:04 sylvermeister

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Apr 23 '25 21:04 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar Apr 30 '25 21:04 github-actions[bot]