Echarts的详细描述

 

option = {

//标题

          title: {

      text: title,
      //标题样式
      textStyle: {
         fontWeight: 'normal',
         color: '#fff',
          },
      },
//网格线,图跟边框的距离
grid:{
    left: '4%',
    right: '5%',
    bottom: '6%',
    top:'5%',
    containLabel: true
},
    xAxis: {
      type: 'category',
      //x轴字体颜色
      axisLine: {
      lineStyle: {
      color: '#fff'
          }
        },
       data: ['0822','0823','0824','0826','0827','0828']
      },
    yAxis: {
       type: 'value',
       //y轴颜色
       axisLine: {
         lineStyle: {
           color: '#fff'
           }
          },
       //y轴设置为百分比
       axisLabel: {
            formatter: '{value}%',
        },
       //坐标轴内线的样式
       splitLine: {
         lineStyle: {
           color: '#666',
           //type:'dashed'虚线
          }
        }
         },
       series: [{
         //折线上数字
         label: {
          normal: {
               show: true,
               position: 'top',
               formatter:'{c}%'
              }
          },
         // 折线颜色
         itemStyle: {
              normal: {
             color: '#33CCFF',
             lineStyle: {
               color: '#33CCFF'
                 }
               }
         },
           data:['78.57','50','80','93.33','92.86','100'],
           type: 'line',
           smooth: true,
                              //带箭头的平均值
                              markLine : {
                                      // symbol:'none',/*去掉箭头
                                    data : [
                                            {type : 'average', name: '平均值'}
                            ],
                                    lineStyle:{
                                    color:'#FFCC01'
                                 }
                           },
itemStyle: {
    normal: {
        // 颜色渐变
        color: new this.$echarts.graphic.LinearGradient(
            0, 0, 0, 1,
            [
                {offset: 0, color: '#2f7ea4'},
                {offset: 0.5, color: '#2e6096'},
                {offset: 1, color: '#234362'},
            ]
        )
    },
},
       }]
     };
      myChart.setOption(option);
   }     
   }

  

转载于:https://www.cnblogs.com/keai/p/11056696.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值