javascript - Use echarts to make a horizontal histogram, but what should I do if the data exceeds the range of the coordinate axis?
高洛峰
高洛峰 2017-06-26 10:57:19
0
1
1302

The top data is not in this coordinate axis
The code is like this, I don’t know where the configuration is wrong
Thank you! ! !

        var option5 = {
                tooltip: {
                    trigger: 'item',
                    formatter: "{a} <br/>{b}: {c} ({d}%)",
                    axisPointer: {
                        type: 'shadow'
                    }
                },
                legend: {
                    orient: 'vertical',
                    x: 'left',
                    data:data1
                },
                xAxis: {
                    type: 'value',
                    boundaryGap: [0, 0.01]
                },
                yAxis: {
                   
                    data: data1
                },
                series: [
                    {
                        name:'用户数',
                        type:'bar',
                        radius: ['50%', '70%'],
                        avoidLabelOverlap: false,
                        label: {
                            normal: {
                                show: false,
                                position: 'center'
                            },
                            emphasis: {
                                show: true,
                                textStyle: {
                                    fontSize: '30',
                                    fontWeight: 'bold'
                                }
                            }
                        },
                        labelLine: {
                            normal: {
                                show: false
                            }
                        },
                        data:data6
                    }
                ]
            };
高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
Ty80

Check whether the lengths of the two numbers data5 and data6 are consistent, and comment on the variable names by the way...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template