echarts加阈值,上限下限虚线

option = { xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, series: [{...
option = {
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
   series: [{
        data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: 'line',
        markLine : {
   symbol:"none",           //去掉警戒线最后面的箭头
   label:{
       position:"end"  //三个值“start”,"middle","end"  开始  中点 结束
        },
             data : [
               {
    silent:false,    //鼠标悬停事件  true没有,false有
    lineStyle:{      //警戒线的样式  ,虚实  颜色
                      type:"dotted",   // type: 'solid'  //'dotted'虚线 'solid'实线
       color:"green",
       borderWidth:8,
       },
     label:{show:true,position:'end',formatter:'报警值'+800},
     yAxis:800 
    },
    {
    silent:false,    //鼠标悬停事件  true没有,false有
    lineStyle:{      //警戒线的样式  ,虚实  颜色
                      type:"dotted",   // type: 'solid'  //'dotted'虚线 'solid'实线
       color:"green",
       borderWidth:8,
       },
     label:{show:true,position:'end',formatter:'报警值'+800},
     yAxis:500 
    },
    ]
         }
    }]
};

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
admin
admin

651 篇文章

作家榜 »

  1. admin 651 文章
  2. 粪斗 185 文章
  3. 王凯 92 文章
  4. 廖雪 78 文章
  5. 牟雪峰 12 文章
  6. 李沁雪 9 文章
  7. 全易 2 文章
  8. Stevengring 0 文章