2017-02-09 56 views
0

HTML我在x軸系列名稱和y軸數值中遇到了Highcharts問題,我不想要這個名字?

<script src="https://code.highcharts.com/highcharts.js"></script> 

    <div id="container" style="height: 400px"></div> 

JS

Highcharts.chart('container', { 
    title: { 
    text: 'X axis labels are disabled' 
}, 
xAxis: { 

    labels: { 
     enabled: false 
    } 
}, 

    series: [{ 
    data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, [enter link description here][1]194.1, 95.6, 54.4] 
}] 
}); 

http://jsfiddle.net/Kondaldurgam/jfg8w3f9/

在x軸上,我想禁用系列名稱和y軸在閥產品名稱禁用

回答

0

製作傳說enable:false,和yAxis標題text:''

Fiddle link

Highcharts.chart('container', { 
    title: { 
     text: 'X axis labels are disabled' 
    }, 
    xAxis: { 

     labels: { 
      enabled: false 
     } 
    }, 
    yAxis: { 

     title: { 
      text: '' 
     }, 
    }, 
    legend:{ 
     enabled: false 
    }, 

    series: [{ 
     data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] 
    }] 
}); 
+0

頭名稱X軸標籤被禁用我希望圖形外的標題名稱 – Kondal

+0

[小提琴](http://jsfiddle.net/deep3015/ gqh45zbx/1 /)是根據要求 –

0

您可以刪除X,並通過設置labels:{enabled: false}title:{text:null} y軸的標籤和值。也可以在您的系列showInLegend: false,中插入此圖表來隱藏圖表圖例。

Working Fiddle

樣品JS:

Highcharts.chart('container', { 
    title: { 
     text: 'X axis labels are disabled' 
    }, 
    xAxis: { 

     labels:{enabled: false}, 
     title: { 
       text: null 
     } 
    }, 
    yAxis: { 
    labels:{enabled: false}, 
    title: { 
      text: null 
    } 
    }, 

    series: [{ 
      showInLegend: false, 
     data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] 
    }] 
});