单纯曲线

描述:当前是关于Echarts图表中的 折线图 示例。
 
            let dataC1 = [20, 30, 60, 40, 50, 30];
let xData = ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00'];

option = {
    backgroundColor: 'transparent',
    xAxis: {
        type: 'category',
        axisLine: {
            show: false,
        },
        axisTick: {
            show: false,
        },
        axisLabel: {
            show: false,
        },
        data: xData,
    },
    yAxis: {
        type: 'value',
        axisLine: {
            show: false,
        },
        splitLine: {
            show: false,
        },
        axisTick: {
            show: false,
        },
        axisLabel: {
            show: false,
        },
        boundaryGap: ['20%', '20%'],
    },
    series: [
        {
            name: '',
            type: 'line',
            stack: '总量',
            smooth: false,
            symbol: 'none',
            showSymbol: false,
            symbolSize: 8,
            lineStyle: {
        normal: {
            // 颜色渐变函数 前四个参数分别表示四个位置依次为
            // 右下左上
          color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ 
                                        offset: 0, 
                                        color: 'rgba(62, 120, 255, 0.2)' 
                                    },{ 
                                        offset: 1, 
                                        color: 'rgba(62, 120, 255, 1)' 
                                    }]),//线条渐变色 
          width: 2,
          shadowColor: 'rgba(70, 55, 88, 0.35)',
          shadowBlur: 0,
          shadowOffsetX: 0,
          shadowOffsetY: 0
        },
      },
            data: [10, 10, 30, 12, 15, 3, 7],
        },
    ],
};