小程序echarts实现上下限展示,并插入文字

var option = {
    tooltip: {
      trigger: 'axis',
      axisPointer: {
          type: 'cross',
          label: {
              backgroundColor: '#6a7985'
          }
      }
  },
    graphic:{
      type: "text",
      z:10,
      left: '15%',
			top: '16%',
      style: {
         text: ["底层模型1","底层模型2", "底层模型3", "底层模型4"].join("\n"),
         fill: "#435978",
         font: '12px "STHeiti", sans-serif',
				 lineHeight: 18,
				 opacity: 0.8
      }
    },
    legend: {
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: [
        {
            type: 'category',
            boundaryGap: false,
            data: ['2023-09-09', '2023-09-10', '2023-09-11', '2023-09-12', '2023-09-13', '2023-09-14', '2023-09-15']
        }
    ],
    yAxis: [
        {
            type: 'value'
        }
    ],
    series: [
        {
            name: '上限',
            type: 'line',
            data: [ , ,160 ,170, 175,201, 210,190, 330, 310],
            smooth:true,
            stack: 'Total',
							areaStyle: {
								color: {
									type: 'linear',
									x: 0,
									y: 0,
									x2: 0,
									y2: 1,
									colorStops: [{
										offset: 0,
										color: '#778aff'
									}, {
                    offset: 1,
										color: '#FFFFFF'
									}],
									global: false
								},
								opacity: 1
							},
							symbol: 'none',
        },
        {
          name: '下限',
          type: 'line',
           data: [ , , 50 ,60, 32,40, 34,90, 30, 10],
            symbol: 'none',
            smooth:true
      }, 
        {
            name: '平均值',
            type: 'line',
            data: [200,150,120, 132, 101, 134, 90, 230, 210],
            symbol: 'none',
            smooth:true
        }
    ]
};

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值