echarts常见配置
文章目录
x轴、y轴label自定义
yAxis: {
axisLabel: { textStyle: { color: '#fff' ,fontFamily: 'TencentSans',fontSize:'18px'} }
}图标柱状、折线样式
series: [{
data:[],
lineStyle: { color: '#5470C6', width: 1, type: 'dashed' },
}]渐变色
import * as echarts from 'echarts/core';
new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{offset: 0, color: '#03F5FF'},
{offset: 1, color: '#00A2FF'}
]
)x轴倾斜
xAxis: {
axisLabel: {
rotate: 45
}
},
grid:{
bottom:100
},tootip背景色
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
backgroundColor: 'rgba(47, 6, 170, 0.8)',
borderColor: '#00FFFF',
borderWidth:1,
textStyle:{
color: '#FFFFFF',
fontSize: '18px',
fontFamily: 'TencentSans',
}
}持续更新...
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论