Heim  >  Fragen und Antworten  >  Hauptteil

javascript - Erstellen Sie mit Echarts ein horizontales Histogramm. Was soll ich jedoch tun, wenn die Daten den Bereich der Koordinatenachse überschreiten?

Die oberen Daten liegen nicht mehr auf dieser Koordinatenachse
Der Code ist so, ich weiß nicht, wo die Konfiguration falsch ist
Vielen Dank an alle! ! !

        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
                    }
                ]
            };
高洛峰高洛峰2674 Tage vor1231

Antworte allen(1)Ich werde antworten

  • PHP中文网

    PHP中文网2017-06-26 10:59:19

    检查一下 data5 和 data6 两个数字长度是否一致,顺便吐槽一下变量名……

    Antwort
    0
  • StornierenAntwort