2013-12-18 87 views
1

在我的應用程序中,我希望在加載時顯示處於可見狀態的所有工具提示。我在這裏提交我的代碼。但是,在默認情況下它僅顯示在鼠標移到..幫我要怎麼做..如何在頁面加載時在高圖中顯示工具提示

$(function() { 
    chart = new Highcharts.Chart({ 
    chart: { 
     renderTo: 'container' 
     }, 
Axis: { 
    categories: ['Jan', 'Mar', 'May', 'Jul', 'Sep', 'Nov', 'Dec'], 
    lineWidth: 0, 
    minorGridLineWidth: 0, 
    lineColor: 'transparent', 
    labels: { enabled: false }, 
    minorTickLength: 0, 
    tickLength: 0 
    }, 
yAxis: { 
    plotLines: [{ 
    value: 0, 
    width: 1, 
    color: '#808080' 
      }], 
    lineWidth: 0, 
    minorGridLineWidth: 0, 
    lineColor: 'transparent', 
    labels: { enabled: false }, 
    gridLineColor: 'transparent', 
    minorTickLength: 0, 
    tickLength: 0 
    }, 
tooltip: { 
    headerFormat: '<table>', 
    pointFormat: '<tr>' + 
       '<td style="padding:0;"><b>{point.y:.1f} </b></td></tr>', 
      footerFormat: '</table>', 
    shared: true, 
    useHTML: true 
    }, 
series: [{ 
    name: 'Tokyo', 
    data: [7.0, 14.5, 21.5, 26.5, 18.3, 9.6] 
     }], 
    }); }); 

回答

1

Unforunately您不能顯示所有的提示(我的意思是每一個每點)監守我們使用單一工具提示容器,這與fullfill正確的內容在鼠標懸停。只有你可以做的是爲每個具有定義位置(頂部/左邊距)和絕對位置的點添加div。

相關問題