echarts怎么通过改变legend改变xAxis的显示
答案:2 悬赏:80 手机版
解决时间 2021-01-27 07:58
- 提问者网友:玫瑰园
- 2021-01-26 07:35
echarts怎么通过改变legend改变xAxis的显示
最佳答案
- 五星知识达人网友:行路难
- 2021-01-26 09:05
这个可以修改,用自定义的图片就可以修改默认的legend形状
代码如下
legend: {
orient: 'horizontal', // 'vertical'
x: 'right', // 'center' | 'left' | {number},
y: 'top', // 'center' | 'bottom' | {number}
backgroundColor: '#eee',
borderColor: 'rgba(178,34,34,0.8)',
代码如下
legend: {
orient: 'horizontal', // 'vertical'
x: 'right', // 'center' | 'left' | {number},
y: 'top', // 'center' | 'bottom' | {number}
backgroundColor: '#eee',
borderColor: 'rgba(178,34,34,0.8)',
全部回答
- 1楼网友:独行浪子会拥风
- 2021-01-26 10:17
这个可以修改,用自定义的图片就可以修改默认的legend形状
代码如下
legend: {
orient: 'horizontal', // 'vertical'
x: 'right', // 'center' | 'left' | {number},
y: 'top', // 'center' | 'bottom' | {number}
backgroundcolor: '#eee',
bordercolor: 'rgba(178,34,34,0.8)',
borderwidth: 4,
padding: 10, // [5, 10, 15, 20]
itemgap: 20,
textstyle: {color: 'red'},
selected: {
'降水量' : false
},
data: [
{
name:'蒸发量',
icon : 'image://../asset/ico/favicon.png',
textstyle:{fontweight:'bold', color:'green'}
},
'降水量','最高气温', '最低气温'
]
}
主要看data属性里面
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯