2013-04-05 69 views

回答

7

你必須指定一個工具提示格式器自己(見documentation):

tooltip: { 
    formatter: function() { 
    return 'The value for <b>'+ this.x + 
      '</b> is <b>'+ this.y +'</b>'; 
    } 
}, 

那裏你可以只顯示x值,如果你喜歡或您的自定義文本。
希望有所幫助。

+0

正是我一直在尋找! Dziękuję! – 2013-04-10 07:51:51

2

我已經修改了演示,並創建了一個新DEMO這裏

要定製的tooltip顯示的文本,你應該使用它想:

Highcharts.chart('container', { 

    title: { 
     text: 'Solar Employment Growth by Sector, 2010-2016' 
    }, 

    subtitle: { 
     text: 'Source: thesolarfoundation.com' 
    }, 
........ 
..... 
.... 

    tooltip: { 
     formatter: function() { 
     return '<strong>X value: </strong>'+ this.x; 
     } 
    }, 
});