zoukankan      html  css  js  c++  java
  • echart绘制进度条、仪表盘、各种样式的折线图、饼图、环形图、地图等


    1、进度条

     关键option: 

    chart.setOption({
            backgroundColor: '',
            title: [
              {
                text:'使用率',
                x: 'center',
                top: '80%',
                textStyle: {
                  color: '#B2D4F4',
                  fontSize: 15,
                }
              },
              {
                text: '59%',
                x: 'center',
                top: '40%',
                textStyle: {
                  fontSize: '30',
                  color: '#B2D4F4',
                  fontFamily: 'Lato',
                  foontWeight: '600'
                }
              }
            ],
            polar: {
              radius: ['49%', '60%'],
              center: ['50%', '50%']
            },
            angleAxis: {
              max: 100,
              show: false
            },
            radiusAxis: {
              type: 'category',
              show: true,
              axisLabel: {
                show: false
              },
              axisLine: {
                show: false
              },
              axisTick: {
                show: false
              }
            },
            series: [
              {
                name: '',
                type: 'bar',
                roundCap: true,
                barWidth: 65,
                showBackground: true,
                backgroundStyle: {
                  color: '#405371'
                },
                data:59,
                coordinateSystem: 'polar',
    
                itemStyle: {
                  normal: {
                    color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
                      {
                        offset: 0,
                        color: this.settingOption.color[1]
                      },
                      {
                        offset: 1,
                        color: this.settingOption.color[0]
                      }
                    ])
                  }
                }
              }
            ]
          })

    2、仪表盘

    浅喜似苍狗,深爱如长风
  • 相关阅读:
    AWK
    ftp自动上传下载文件脚本
    tostring格式化输出
    C#时间处理--DateTime和TimeSpan
    C#正则表达式语法规则详解
    C#常用的正则表达式
    C#字符串截取
    FTP操作
    [BZOJ2947]促销(Splay)
    [BZOJ1208]宠物收养所(Splay)
  • 原文地址:https://www.cnblogs.com/Zhang-jin/p/15294218.html
Copyright © 2011-2022 走看看