2014-09-19 95 views

回答

7

嘗試清空xAxis中的所有值或使用以下代碼。

xAxis: { 
     categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 
      'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 
     labels: { 
      enabled: false 
     } 
    } 

請參閱例如 http://jsfiddle.net/ssgoanb5/

見文檔:http://api.highcharts.com/highcharts#xAxis.labels.enabled

最新更新:

爲了避免上圖表軸(X/Y)小數值,添加allowDecimals屬性。

請參閱Doc。 http://api.highcharts.com/highcharts#yAxis.allowDecimals

yAxis: { 
     allowDecimals: false, 
     title: { 
      text: 'Temperature (°C)' 
     }, 
     plotLines: [{ 
      value: 0, 
      width: 1, 
      color: '#808080' 
     }] 
    } 

請檢查更新的jsfiddle:http://jsfiddle.net/ssgoanb5/6/

+1

http://stackoverflow.com/questions/10877927/hide-axis-and-gridlines-highcharts – vimalpt 2014-09-19 04:29:16

+0

Finoy,看來你的解決方案是不工作我。兩個原因:1)我需要X軸上的標籤。 2)在我的情況下,我有縮放。當我縮放時,我在Y軸上看到小數點。看到這個更新的例子:http://jsfiddle.net/mddc/ssgoanb5/5/ – curious1 2014-09-19 05:12:48

+1

請檢查更新JSfiddle:http://jsfiddle.net/ssgoanb5/6/ 它可能會解決您的問題。我也更新了答案 – 2014-09-19 08:49:27