github项目增长趋势(实线虚线结合)echarts 折线配置项内容和展示

实线为过去增长,虚线为预测

配置项如下
      option = {
    xAxis: {
        data: ['2015-04-20', '2015-08-31', '2016-01-07', '2016-04-25', '2016-07-07', '2016-10-15', '2017-01-11', '2017-03-29', '2017-06-24', '2017-09-20', '2017-11-23', '2018-02-08', '2018-04-20', '2018-06-02', '2018-09-09', '2018-12-02', '2019-03-01', '2019-06-06'],
    },
    tooltip: {
        trigger: 'axis',
    },
    legend: {
        align: 'right',
        data: ['emqtt/emqtt.github.io', 'emqtt/emqttd'],
        textStyle: {
            align: 'right',
            baseline: 'middle',
            fontFamily: 'IRANSans'
        }
    },
    toolbox: {
        show: true,
        feature: {
            dataZoom: {
                yAxisIndex: 'none'
            },
            dataView: {
                readOnly: false,
            },
            magicType: {
                type: ['line', 'bar']
            },
            restore: {},
            saveAsImage: {}
        }
    },
    yAxis: {
        name: 'star num',
        // min: 7.5,
    },
    series: [{
            name: 'emqtt/emqtt.github.io',
            type: 'line',
            smooth: true,
            itemStyle: {
                normal: {
                    lineStyle: {
                        color: 'gray',
                    }
                }
            },
            // data: [8.366322214245816, 8.994353436858859, 9.430452551665532, 9.813781191217037, 10.076815597050832, 10.29920801838728, 10.521600439723727, 10.688250309133178, 10.837627933171404, 10.994353436858859, 11.116343961237469, 11.228818690495881, 11.349834091457247, 11.475226777742266]
            data: [330, 510, 690, 900, 1080, 1260, 1470, 1649, 1829, 2040, 2220, 2400, 2609, 2847],
        },
        {
            name: 'emqtt/emqttd',
            type: 'line',
            smooth: true,
            itemStyle: {
                normal: {
                    lineStyle: {
                        color: 'green',
                    }
                }
            },
            // data: [7.491853096329675, 8.60733031374961, 9.252665432450248, 9.714245517666123, 10.076815597050832, 10.366322214245816, 10.60733031374961, 10.78953364497036, 10.972979786066292, 11.1357092861044, 11.264442600226602, 11.398743691938193, 11.521600439723727, 11.727069558023706]
            data: [180, 389, 609, 840, 1080, 1320, 1559, 1770, 2010, 2249, 2459, 2700, 2940, 3389],
        },
        {
            name: 'emqtt/emqtt.github.io',
            type: 'line',
            smooth: true,
            itemStyle: {
                normal: {
                    lineStyle: {
                        width: 2,
                        type: 'dotted',
                        color: 'gray',
                    }
                }
            },
            // data: [8.366322214245816, 8.994353436858859, 9.430452551665532, 9.813781191217037, 10.076815597050832, 10.29920801838728, 10.521600439723727, 10.688250309133178, 10.837627933171404, 10.994353436858859, 11.116343961237469, 11.228818690495881, 11.349834091457247, 11.475226777742266, 11.622223305317841, 11.802223305317841, 12.002223305317841, 12.202223305317841]
            data: [330, 510, 690, 900, 1080, 1260, 1470, 1649, 1829, 2040, 2220, 2400, 2609, 2847, 3112, 3391, 3702, 4022],
        },
        {
            name: 'emqtt/emqttd',
            type: 'line',
            smooth: true,
            itemStyle: {
                normal: {
                    lineStyle: {
                        width: 2,
                        type: 'dotted',
                        color: 'green'
                    }
                }
            },
            // data: [7.491853096329675, 8.60733031374961, 9.252665432450248, 9.714245517666123, 10.076815597050832, 10.366322214245816, 10.60733031374961, 10.78953364497036, 10.972979786066292, 11.1357092861044, 11.264442600226602, 11.398743691938193, 11.521600439723727, 11.727069558023706, 11.998436755858168, 12.298436755858168, 12.598436755858168, 12.918436755858168]
            data: [180, 389, 609, 840, 1080, 1320, 1559, 1770, 2010, 2249, 2459, 2700, 2940, 3389, 4091, 5037, 6201, 7741],
        },
    ]
};
    
截图如下