You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/09/01 09:07:50 UTC

[GitHub] [echarts] xinagcai commented on issue #5545: 折线图分区段填充颜色

xinagcai commented on issue #5545:
URL: https://github.com/apache/echarts/issues/5545#issuecomment-909055178


   老铁们我解决了
   `  var option = {
   
           tooltip:{
               show:false,
           },
           grid:{
               rigth:0,
               top:'10',
               left:"20",
           },
           yAxis:
   
               {	show:true,
                   splitNumber: 4,
                   splitLine: {
                       show: true
                   },
                   axisLine:{
                       show:false
                   },
                   axisTick: {
   
                       show:false //y轴坐标点消失
   
                   },
                   axisLabel: {
                       formatter:function(){
                           return ""
                       }
                   },
               },
           xAxis: {
               axisLine:{
                   show:false //y轴线消失
               },
               axisLabel: {
                   formatter: function (value) {
                       if(value==xdata[4] || value==xdata[0]){
                           return "";
                       }else{
                           return value+'岁'
                       }
   
                   }
               },
               axisTick: {show:false},
               type: 'category',
               boundaryGap: false,
               data: xdata,
           },
           series:[
   
               {
                   smooth: true,
                   symbol: 'none',
                   type: 'line',
                   color:'rgba(24, 144, 255, 0.3)',
                   areaStyle: {
                       color:'rgba(24, 144, 255, 0.1)'
                   },
                   data:[0,1,'-','-','-']
   
               },
               {
                   smooth: true,
                   symbol: 'none',
                   type: 'line',
                   color:'rgba(24, 144, 255, 0.3)',
                   areaStyle: {
                       color:'rgba(24, 144, 255, 1)'
                   },
                   data:['-',1,3,'-','-']
   
               },
               {
                   smooth: true,
                   symbol: 'none',
                   type: 'line',
                   color:'rgba(24, 144, 255, 0.3)',
                   areaStyle: {
                       color:'rgba(24, 144, 255, 0.7)'
                   },
                   data:['-','-',3,3,'-']
   
               },
               {
                   smooth: true,
                   symbol: 'none',
                   type: 'line',
                   color:'rgba(24, 144, 255, 0.3)',
                   areaStyle: {
                       color:'rgba(24, 144, 255, 0.3)'
                   },
                   data:['-','-','-',3,0]
   
               },
   
           ]
   
       };`
   ![image](https://user-images.githubusercontent.com/66870330/131476593-b6dffd43-088a-4330-adb7-37d6ae02d96e.png)
   主要就是series
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org