码迷,mamicode.com
首页 > 其他好文 > 详细

echarts修改X、 Y坐标轴字体的颜色

时间:2018-10-12 16:14:38      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:als   src   style   背景   ntc   spl   image   type   axis   

1、背景:在项目中常常会用到echarts的实例,根据不同的需求字体颜色需要变化,如图,要切合背景,就需要更改字体颜色

技术分享图片

2、解决方案

 

xAxis : [
            {
              type : ‘category‘,
              data : weekDay,
              axisLabel: {
                show: true,
                textStyle: {
                  color: this.xFontColor   //这里用参数代替了
                }
              },
            }
          ],
          yAxis : [
            {
              type : ‘value‘,
              splitLine:{
                show:false
              },
              //  去掉背景的网格线
              axisLabel: {
                show: true,
                textStyle: {
                  color:this.yFontColor  //这里用参数代替了
                }
              },
            }
          ],

 

echarts修改X、 Y坐标轴字体的颜色

标签:als   src   style   背景   ntc   spl   image   type   axis   

原文地址:https://www.cnblogs.com/yun1108/p/9778250.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!