鍍金池/ 問答/PHP  HTML/ echart 如何修改折線圖的原點的顏色添加提示信息和修改y軸的文字樣式。

echart 如何修改折線圖的原點的顏色添加提示信息和修改y軸的文字樣式。

就是我圖片圈起來的地方圖片描述

這是我的代碼 新手求大神指教

option = {
    tooltip : {
        trigger: 'axis',
     
    },
    
    toolbox: {
        show : true,
        feature : {
            mark : {show: true},
            dataView : {show: true, readOnly: false},
            magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
            restore : {show: true},
            saveAsImage : {show: true}
        }
    },
    calculable : true,
     
    xAxis : [
        {
            type : 'category',
            boundaryGap : false,
            data : ['2012','2013','2014','2015','2016','2017','2018']
        }
    ],
   grid: {
           'backgroundColor':'rgba(10,220,110,.5)',
           height:'200'
        },
     
    yAxis : [
        {
            type : 'value'
        }
    ],

axisLabel:{
        textStyle:{
             color:"#333333"http://x軸,y軸的數(shù)字顏色,如圖1
        }
    },
    axisTick:
    {
        show: false,
    },

    series : [

        {
            name:'推廣流量',
            type:'line',
            stack: '總量',
            symbol:'circle',
            symbolSize:"10",
            itemStyle: {normal: {areaStyle: {type: 'default'}}},
               color: {
        type: 'linear',
        x: 0,
        y: 0,
        x2: 0,
        y2: 1,
        colorStops: [{
        offset: 1, color: '#fefeff' // 0% 處的顏色
    }, {
        offset: 0.4, color: '#e8efff' // 100% 處的顏色
    }],
    globalCoord: false // 缺省為 false
},
              itemStyle: {
                normal: {
                    areaStyle: {
                        // 區(qū)域圖,縱向漸變填充
                     
                    },
                    lineStyle:{  
                     color:'#f68698'  
                                    }  
                }
            },

            data:[50, 110, 80, 200, 240, 70, 350]
        },
       
    ]
};
回答
編輯回答
愚念

axisLabel: { //處理單位相關
formatter: '{value}單位'
},
axisLine: { //處理坐標軸顏色

        lineStyle: {
            color: 'red',
        }
    },

axisLabel: { //處理坐標軸字體

        color: '#000',   
    }
2018年4月5日 07:19
編輯回答
孤慣

其實網(wǎng)上很多,
`//設置坐標軸的顏色
xAxis: [
{

type : 'category',
data : [],
splitLine: false,
nameTextStyle: {
  color: '' // x坐標軸名稱文字樣式
},
axisLine: {
  lineStyle: {
    color: '' //坐標軸線顏色
  }
}

}
]

//設置折現(xiàn)的顏色和折點的顏色

            series: [{
                data: number,
                type: 'line',
                itemstyle : {
                    normal : {
                        linestyle:{
                            color:'#16e868',
                        },
                        bordercolor:"#16e868"
                    }
                },
            }]
            

//設置坐標字體顏色

                    axisLabel: {
                        show: true,
                        textStyle: {
                            color: 'white'
                        }
                    },`
2017年7月17日 21:51