为啥用的echarts里的同样option代码,生成的效果不同

option = {
            tooltip: {
                trigger: 'axis',
                order: 'seriesDesc',
                // backgroundColor: "#F4F7FD",
                axisPointer: {
                    type: 'cross',
                    label: {
                        backgroundColor: '#6a7985'
                    }
                }
            },
            legend: {
                data: [
                    {
                        name: '当日扫码量',
                        icon: 'rect',
                        itemStyle: {
                            color: 'rgb(232, 24, 255)'
                        }
                    },
                    {
                        name: '扫码人数',
                        icon: 'rect',
                        itemStyle: {
                            color: 'rgb(30, 215, 255)'
                        }
                    },
                ],
                right: 30,
                top: 0,
                bottom: 20,
                itemWidth: 50,
                itemHeight: 5,
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: [
                {
                    type: 'category',
                    boundaryGap: false,
                    data: ['06-10', '06-11', '06-12', '06-13', '06-14', '06-15', '06-16']
                }
            ],
            yAxis: [
                {
                    type: 'value'
                }
            ],
            series: [

                {
                    name: '扫码人数',
                    type: 'line',
                    stack: 'Total',
                    smooth: true,
                    lineStyle: {
                        width: 3
                    },
                    itemStyle: {
                        color: 'rgb(30, 215, 255)',
                    },
                    showSymbol: false,
                    areaStyle: {
                        opacity: 0.8,
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                            {
                                offset: 0,
                                color: 'rgb(150, 163, 247)'
                            },
                            {
                                offset: 1,
                                color: 'rgb(248, 247, 255)'
                            }
                        ])
                    },
                    emphasis: {
                        focus: 'series'
                    },
                    data: [2, 2, 3, 4, 3, 3, 2]
                },
                {
                    name: '当日扫码量',
                    type: 'line',
                    stack: 'Total',
                    smooth: true,
                    lineStyle: {
                        width: 3
                    },
                    itemStyle: {
                        color: ' rgb(232, 24, 255)',
                    },
                    showSymbol: false,
                    areaStyle: {
                        opacity: 0.8,
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                            {
                                offset: 0,
                                color: 'rgb(216, 97, 230)'
                            },
                            {
                                offset: 1,
                                color: 'rgb(253, 232, 255)'
                            }
                        ])
                    },
                    emphasis: {
                        focus: 'series'
                    },
                    data: [4, 3, 3, 3, 3, 4, 3,]
                },
            ]
        };// option2 = {
        放到自己的页面,

里面,扫码人数和当日扫码量上下顺序就翻转了,怎么解决

这个为啥没有生效,还有前面图例的颜色和后面数值的颜色如何同一颜色,文字颜色还是白色?求大神帮忙

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值