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',
  }
}

持续更新...

阅读 549
311 声望
188 粉丝
0 条评论
311 声望
188 粉丝
文章目录
宣传栏