SOURCE

console 命令行工具 X clear

                    
>
console
var charts = echarts.init(document.getElementById('charts'));
option = {
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'none'
    },
    showContent: false
  },
  grid: {
    left: '0',
    right: '0',
    bottom: '0',
    top: '12'
  },
  xAxis: {
    boundaryGap: false,
    axisLabel: {
      show: false
    },
    axisTick: {
      show: false
    },
    axisLine: {
      show: false
    },
    data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
  },
  yAxis: {
    axisLabel: {
      show: false
    },
    axisTick: {
      show: false
    },
    axisLine: {
      show: false
    },
    splitLine: {
      show: false
    }
  },
  series: {
    type: 'line',
    smooth: true,
    symbol: 'circle',
    symbolSize: 5,
    showSymbol: false,
    animationDuration: 1000,
    lineStyle: {
      normal: {
        width: 2,
        color: {
          type: 'linear',
          x: 0,
          y: 0,
          x2: 1,
          y2: 0,
          colorStops: [{
            offset: 0,
            color: '#39C2FF'
          },
          {
            offset: 1,
            color: '#39C2FF'
          }],
          globalCoord: false 
        },
        opacity: 0.9
      }
    },
    areaStyle: {
      normal: {
        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
          offset: 0,
          color: 'rgba(57, 194, 255, 0.3)'
        },
        {
          offset: 0.8,
          color: 'rgba(57, 194, 255, 0)'
        }], false),
        shadowColor: 'rgba(57, 194, 255, 0.1)',
        shadowBlur: 10
      }
    },
    itemStyle: {
      normal: {
        color: 'rgb(44,79,255)',
        borderColor: 'rgba(40,123,232,0.27)',
        borderWidth: 12

      }
    },
    data: [220, 182, 191, 134, 250, 120, 110, 125, 145, 122, 165, 122, 150, 160, 150, 100, 200, 230, 180, 190]
  }
};
charts.setOption(option);
<div id='charts'>
</div>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  background: #eee;
}

#charts {
  display: block;
  margin: calc(50vh - 75px) auto;
  width: 500px;
  height: 150px;
  background: #001B40;
  opacity: .8;
  transition: opacity .3s;
}

#charts:hover {
  opacity: 1;
}

本项目引用的自定义外部资源