score:55
Have you tried using the formatter
option for dataLabels
? You should be able to access your data within that and decide what the label should look like. Here you can check for zero and just return null
shown below.
dataLabels: {
enabled: true,
color: colors[0],
style: {
fontWeight: 'bold'
},
formatter: function() {
if (this.y != 0) {
return this.y +'%';
} else {
return null;
}
}
}
Additionally, if you are having trouble figuring out what part of your data to look at, use console.log(this)
in the formatter function so you can see the object you are working with.
Check out this working jsfiddle example: http://jsfiddle.net/VLmKK/69/
Hope that helps!
Update: Return null instead of empty string to avoid creation of an invisible label as mentioned in the comments by Brett. Thanks.
You may also not return anything on zero values.
Source: stackoverflow.com
Related Query
- Highcharts remove zero value labels
- highcharts remove gap (column) with zero value
- How to remove the value and number labels from Highcharts angular gauge
- Highcharts Column chart with drilldown, remove hyperlink like formatting from x-axis labels
- Highcharts remove gap between start of xAxis and first value
- highcharts data labels overlaps the plotlines value
- Remove gap in Highcharts column chart from null value from JSON file in React
- remove gap below highcharts area chart when all values are zero
- How to set Highcharts xAxis position on the yAxis zero value (negative/positive chart)?
- want to remove this bullet in front of these labels of highcharts graph
- Highcharts How to change align of data labels based on value
- Can you remove specific grid lines and point labels using highcharts without css?
- Highcharts remove labels after chart creation / drilldown
- Highcharts show real time value on Labels
- Remove Highcharts chart Y axis labels when legend clicked
- Highcharts hover xAxis Labels Unique Value
- Laravel Highcharts - Cant set value and labels from arrays
- I need to remove Y-axis labels on highcharts while keeping the data intact
- How to remove button from Highcharts
- Proper way to remove all series data from a highcharts chart?
- How to set Highcharts chart maximum yAxis value
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- Format Highcharts y-axis labels
- Remove shadow/background glow on highcharts data label?
- Highcharts text labels for y-axis
- Always display data labels above columns in HighCharts
- Set highcharts y-axis min value to 0, unless there is negative data
- How to hide labels in the highcharts in the pie
- missing value in highcharts line graph results in no line, just points
- Highcharts - Keep Zero Centered on Y-Axis with Negative Values
More Query from same tag
- SVG as labels in HighChart stacked column chart
- Draw JSON result in highchart
- Line graph disappears after new line is added
- How do I get Highcharts chart redraw to move faster?
- Highcharts - How do I position tooltip behind icon on each pie slice on hover?
- HighCharts plugin JQuery
- Odd Highcharts interaction between pointRange of two columns and xAxis.max
- Highcharts markers positioning errors in IE8
- Incorrectly displayed plot band icon in Highcharts
- Graph sliding strangely with negativeColor activated
- HighChart pie tooltip fixed
- Highcharts - Hide the Reset zoom button always
- Highcharts customized chart
- Highchart-ng not displaying inside a directive
- How to add units to Highcharts/Highmaps's last legend/coloraxis?
- High charts queue chart updates after ajax with multiple charts in firefox
- Ember.js , HighCharts - accessing JSON data from controller
- Highcharts: long vertical label to span multiple lines
- renderer.text not working in gevgeny/angular2-highcharts
- How to show equally spaced axis for datetime for billing cycle related data on highcharts
- How do I open a new window / tab by clicking on a column / bar within a Highchart graph?
- Highcharts need parse data for showing points?
- Can't change xaxis in highcharts
- Is there a way to calculate custom label position on a Highcharts Activity Gauge?
- Highstock chart tooltip activation only when inside the chart
- Highcharts - Data label cut off
- Highcharts how to create legends based on the value of points
- navigator in highcharts not letting me decide the minimum range
- How is it possible to show the menu of a chart with React Highcharts?
- Highcharts pannig and zooming out of limits