web建站教程
  1. 首页
  2. vuejs
  3. js
  4. 好玩
  5. seo教程
  6. 前端知识
  7. 百度echarts
  8. 更多
    php入门
    nodejs
    mockjs
    reactjs
    mysql
    wordpress
    织梦cms
    帝国cms
    git教程
    IT知识
    模板大全
    休息站

百度echarts如何实现多条折线效果图

444 ℃
     

百度echarts如何实现多条折线效果图,下面web建站小编给大家简单介绍一下具体代码!

代码如下:

var option = {
  tooltip: {
    trigger: 'axis',
  },
  grid: {
    left: '1%',
    right: '2%',
    bottom: '20%',
    containLabel: true,
  },
  legend: {
    padding: 10,
    tooltip: {
      show: true,
    },
    y: 'bottom',
    data: ['门诊', '住院', '体检'],
  },
  xAxis: {
    type: 'category',
    data: [
    '1月11日',
    '1月12日',
    '1月13日',
    '1月14日',
    '1月15日',
    '1月16日',
    '1月17日',
    '1月18日',
    '1月19日',
    '1月20日'
  ]
  },
  yAxis: {
    type: 'value'
  },
  series: [{
      name: '门诊',
      data: [190, 160, 170, 210, 207, 176, 176, 210, 170, 180],
      type: 'line',
      itemStyle: {
        normal: {
          color: 'yellow',
          lineStyle: {
            color: 'yellow'
          }
        }
      },
    },
    {
      name: '住院',
      data: [103, 98, 120, 130, 125, 175, 130, 125, 75, 115],
      type: 'line',
      itemStyle: {
        normal: {
          color: 'blue',
          lineStyle: {
            color: 'blue'
          }
        }
      },
    },
    {
      name: '体检',
      data: [110, 98, 120, 65, 63, 130, 125, 75, 130, 125],
      type: 'line',
      itemStyle: {
        normal: {
          color: 'green',
          lineStyle: {
            color: 'green'
          }
        }
      },
    },
  ],
}

百度echarts雷达图radar根据分数点显示每个不同颜色

百度ECharts文档官网介绍

百度echarts柱状图设置不同颜色(每根柱子一种颜色)

百度echarts图表数据为空如何展示"暂无数据"

百度echarts柱状图/折线图x轴显示全部文本(太长自动换行)

标签: line折线图, 百度echarts

上面是“百度echarts如何实现多条折线效果图”的全面内容,想了解更多关于 js 内容,请继续关注web建站教程。

当前网址:https://ipkd.cn/webs_3704.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

当前位置: 网站首页 > js
本文共计757个字,预计阅读时长6分钟
生活小工具,收录了80多款小工具
上一篇: 推荐一款免费可商用英文字体——Atkinson Hyperlegible
下一篇: 推荐一款免费好看的中文设计字体——字体传奇特战体
x 打工人ai神器