2013-07-24 58 views
1

我想在我的網頁上顯示一些數據,使用帶對數軸的highcharts列長度圖表。雖然它可以處理一些數據,但在某些情況下,它會繪製圖表而不顯示系列。Highcharts對數圖表不在網頁上顯示系列

在JSfiddle中,圖表顯示正確。以下是一些示例代碼:http://jsfiddle.net/3rcRh/1/

$(function() { 
var mychart; 
var ser1=[{"name":"Series1","data": 
    [{"groupName":"Group1","low":1.0,"high":16.0,"x":27},{"groupName":"Group2","low":16.0,"high":17.0,"x":27},{"groupName":"Group3","low":17.0,"high":18.0,"x":27}] }]; 
mychart = new Highcharts.Chart({ 

    chart: { 
     renderTo: 'container', 
     type: 'columnrange', 
     inverted: true 
    }, 

    title: { 
     text: 'Selected Data' 
    }, 

    subtitle: { 
     text: 'Groups' 
    }, 

    xAxis: { 

     title: { 
      text: 'Number of ELements' 
     } 
    }, 

    yAxis: { 
     type: 'logarithmic', 
     title: { 
      text: 'Value Range' 
     } 
    }, 

    tooltip: { 
     crosshairs: [true] 

    }, 

    plotOptions: { 
     series: { 
      cursor: 'pointer', 
      point: { 
       events: { 
        click: function() {    

         alert('clicked'); 
        } 
       } 
      } 
     }, 
     columnrange: { 

     } 
    }, 

    legend: { 
     enabled: true 
    }, 

    series: ser1 

}); 

});

但是,即使當我選擇「分享全屏結果」我得到了同樣的問題在這裏,不顯示數據:http://jsfiddle.net/3rcRh/1/embedded/result/

當我下載圖表從圖表上下文菜單的圖像或pdf,下載的文件包含圖表的正確圖像。

我已經在我的網頁上包含了所有必要的腳本,但我無法弄清楚什麼是錯的。任何幫助將非常感激!

+0

你的jsFiddle代碼頁和jsFiddle共享頁面都爲我顯示系列。什麼瀏覽器,你得到這個問題。我在FF。 – wergeld

+0

在FF,Chrome和IE上試用過它... – user2611743

回答

1

很奇怪,舉報here - 謝謝!

可以解決此:

  • 變化從columnrangecolumn
  • 數據變化從highy
  • 集分鐘爲yAxis: 1

工作例如:http://jsfiddle.net/3rcRh/2/