Highchart条的下半部分消失

问题描述 投票:0回答:1

很多时候,我的高位图表的下半部分在向下钻取时消失,然后向上钻取。我什至禁用了plotoptions的动画,但这不能解决我的问题,我无法在jsfiddle上复制该问题,但不确定是否是由于图表数量过多所致。

Highcharts.chart('container', {
    chart : {
                    type : 'column',
                    events : {
                        drilldown : function(e) {
                            this.xAxis[0].setTitle({
                                text : 'Error Type'
                            });
                            this.setTitle({ text: "Error Distribution by Specifics" });
                             this.xAxis[0].update({
                                  tickInterval: 0,
                          });

                        },
                        drillup : function(e) {


                            this.xAxis[0].setTitle({
                                text : 'Mean Absolute Error (in days)'
                            });
                            this.setTitle({ text: "Error Distribution by Days" });
                             this.xAxis[0].update({
                                  tickInterval: 0.5,
                          });
                        }
                    }
                }, 

    title: {
        text: 'Error Distribution (Days)'
    },
                xAxis : {
                    title : {
                        text : 'Mean Absolute Error in Days'
                    },
                    type: 'category',
                    tickInterval : 0.50,
                    crosshair : true
                },
                yAxis : {
                    title : {
                        text : 'Predicted Error Count'
                    }
                },
                plotOptions: {
                    column: {
                                animation:false
                    }
                },
                tooltip : {
                    headerFormat : '',
                    shared : true,
                    pointFormat : 'Predicted Error Count : {point.y}'

                },

    series: [
        {
            name: "Error Distribution by Days Report",
            data: [


   {
      "x":2,
      "y":500,
      "drilldown":"2",
      "name":2
   },

   {
      "x":3.5,
      "y":500,
      "drilldown":"3.5",
      "name":3.5
   },
   {
      "x":10,
      "y":3508,
      "drilldown":"10",
      "name":"More"
   }

            ]
        }
    ],
    drilldown: {
        series:[
   {
      "name":"2",
      "id":"2",
      "pointWidth":30,
      "data":[
         [
            "Error A",
            500
         ]
      ]
   },
   {
      "name":"10",
      "id":"10",
      "pointWidth":30,
      "data":[
         [
            "Error A",
            501
         ],
         [
            "Error B",
            1001
         ],
         [
            "Error C",
            1
         ]
      ]
   },

   {
      "name":"3.5",
      "id":"3.5",
      "pointWidth":30,
      "data":[
         [
            "Error B",
            500
         ]
      ]
   }
]

    }
});

加载页面时的图像在下方enter image description here

现在,当我向下钻取然后再次向上钻时,下半部分消失

enter image description here

在向下钻取期间也发生相同的问题。

javascript highcharts
1个回答
0
投票

通过在绘图选项中添加clip:false解决了该问题,发现该问题在向下钻取时会生成额外的clipPath,将其删除可以解决问题

© www.soinside.com 2019 - 2024. All rights reserved.