前提
- Vue 项目
- 安装了 echarts 插件
举例
解决
x 轴文字颜色
// ... 其他代码
xAxis: {
axisLabel: {
color: '#fff'
}
}
// ... 其他代码
y 轴文字颜色
// ... 其他代码
xAxis: {
axisLabel: {
color: '#fff'
}
}
// ... 其他代码
图例文字颜色
// ... 其他代码
legend: {
textStyle: {
color: '#fff'
}
}
// ... 其他代码
参考 echarts.apache.org/zh/option.h…
总结
上面方法在配置项文档中都有解释,只不过配置项中内容比较多,一般用的时候再查即可。