I'm using highcharts on my website, which looks great, but I now want to remove these two labels from the chart:
I tried disabling all sorts of labels, such as this one:
{
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, 194.1, 95.6, 54.4]
}]
}
but I can't find a way to remove these specifically.
Here is the fiddle of the image above.
Does anybody know how I can remove these labels?
get('idofseriestoremove'). remove(). This only removes the series but is not removing the associated dotted lines.
destroy () - Removes the chart and purges memory. This method should be called before writing a new chart into the same container. It is called internally on window unload to prevent leaks. var hc_options = { chart: { renderTo: 'container' }, series: [{ name: 'USD to EUR', data: usdeur }] }; var chart=new Highcharts.
To show 'no data' message on a pie chart, you need to remove data from a chart. Also, the 'no data' feature requires the file no-data-to-display. js to be loaded in the page. If you want to show some kind of info when data is hidden, you can add custom text with Chart.
A simpler way to go about this is using the tickInterval attribute: yAxis: { title: { text: 'Percent' }, tickInterval: 10, labels: { formatter: function(){ return this. value + '%'; } } }, That will force your axis intervals to show up as you requested.
The "Values" is the title of the y-axis. It can be disabled like this:
yAxis: {
title: {
text: null
}
}
or
yAxis: {
title: false
}
The "Series 1" is part of the legend. It can be disabled like this:
legend: {
enabled: false
}
Or alternatively disable a specific series from being shown in the legend, like this:
series: [{
showInLegend: false,
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5]
}]
See this updated JSFiddle for a live demonstration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With