ECharts自定义提示框

tooltip: {
                trigger: 'axis',
                position: function (position) {
                    return [position[0], position[1]]
                },
                formatter: '{a0}:{c0}元' + '<br>' + '日期:{b0}'
            },

  背景底色设置:

areaStyle: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: '#005ae6'
                    }, {
                        offset: 1,
                        color: '#ffe'
                    }])
                }

 

posted @ 2020-04-26 16:09  old-man  阅读(567)  评论(0编辑  收藏  举报