echarts 空心点曲线图

这段代码演示如何用ECharts在网页上构建一个动态的折线图,展示11月每日数据,用于可视化分析。
摘要由CSDN通过智能技术生成

效果

在这里插入图片描述

在这里插入图片描述

代码

let xdata = [
        '11.17',
        '11.18',
        '11.19',
        '11.20',
        '11.21',
        '11.22',
        '11.23',
        '11.24',
        '11.25',
        '11.26'
      ]
let data = [
        '1',
        '2',
        '3',
        '6',
        '6',
        '4',
        '6',
        '8',
        '5',
        '7'
      ]
return {
    backgroundColor: '#140a69',
    grid: {
      left: '5%',
      right: '10%',
      top: '20%',
      bottom: '15%',
      containLabel: true
    },
    tooltip: {
      trigger: 'axis',
      backgroundColor: 'rgba(69, 14, 255,0.5)',
      borderWidth: '0',
      textStyle: {
        color: '#6DFFFF'
      },
      axisPointer: {
        type: 'cross',
        label: {
          backgroundColor: 'rgba(14, 95, 255, 0.6)'
        }
      }
    },
    xAxis: [
      {
        type: 'category',
        boundaryGap: false,
        axisLabel: {
          color: 'rgba(255, 255, 255, 0.15)',
          show: true
        },
        axisLine: {
          show: false
        },
        splitLine: {
          show: true,
          lineStyle: {
            color: 'rgba(255, 255, 255, 0.15)'
          }
        },
        data: xdata
      }
    ],
    yAxis: [
      {
        show: false,
        type: 'value',
        axisLine: {
          lineStyle: {
            color: '#27b4c2'
          }
        },
        splitLine: {
          show: true,
          lineStyle: {
            color: '#11366e'
          }
        }
      }
    ],
    series: [
      {
        smooth: true, // 是否平滑
        type: 'line',
        stack: '总量',
        symbol: 'circle',
        symbolSize: 8,
        itemStyle: {
          normal: {
            color: '#140a69',
            borderColor: '#16CEB9',
            borderWidth: 1,
            lineStyle: {
              color: '#16CEB9',
              width: 1
            }
          }
        },
        data
      }
    ]
  }
  • 11
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

南桥几经秋_

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值