在eCharts的日历中自定义边框颜色

问题描述 投票:0回答:1

这是我的Echart热图日历的代码。

option = {
    visualMap: {
        min: 0,
        max: 10000,
        type: 'piecewise',
        orient: 'horizontal',
        left: 'center',
        top: 65,

    },
    calendar: {
        top: 120,
        left: 30,
        right: 30,
        cellSize: ['auto', 13],
        range: '2016',
        itemStyle: {
            borderWidth: 0.5
        },
        yearLabel: {show: false}
    },
    series: {
        type: 'heatmap',
        coordinateSystem: 'calendar',
        data: getVirtulData(2016)
    }
};

enter image description here

所以想改变月份边框的颜色。

javascript charts echarts
1个回答
1
投票

添加 splitLine 对象 calendar.

calendar: {
    top: 120,
    left: 30,
    right: 30,
    cellSize: ['auto', 13],
    range: '2016',
    splitLine:{
      lineStyle:{
          color:'red' // This will change the border color
      }  
    },
    itemStyle: {
        borderWidth: 0.5,
    },
    yearLabel: {show: false}
},
© www.soinside.com 2019 - 2024. All rights reserved.