score:9
Accepted answer
Have you tried using a label formatter?
var chart = new Highcharts.Chart({
yAxis: {
labels: {
formatter: function() {
if(this.value === 0.00001){
return 0;
} else {
return this.value;
}
}
}
}
});
score:1
When dealing with huge numbers, it's better to use the standard label formatter for values other than 0, otherwise your labels gonna be displayed like this: 1000000000... To change this replace 'else' statement to the call to the original label formatter method below:
var chart = new Highcharts.Chart({
yAxis: {
labels: {
formatter: function() {
if(this.value === 0.00001){
return 0;
} else {
return Highcharts.Axis.prototype.defaultLabelFormatter.call(this);
}
}
}
}
});
Source: stackoverflow.com
Related Query
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- Display negative Y values above zero instead below in highcharts
- Highcharts - Keep Zero Centered on Y-Axis with Negative Values
- highcharts zero values results in graph half way instead at the bottom
- Highcharts - Area Chart - Stacking with series containing negative and positive values
- Highcharts - synchronized-charts crosshair line and circle point display
- Highcharts - reduce the space between zero data line and x-axis
- Column chart with negative values and categories on xAxis in HighCharts
- highcharts lollipop/dumbbell chart change position/colour of positive and negative marker values
- How to make label in highcharts area graph display absolute values instead of negative values?
- Highcharts to display area range and line chart with data from a CSV file
- Spring MVC: How to display Hashmap keys and values in highcharts
- Display and use time values on Highcharts
- How to display values on line stacked columns on highcharts
- How to display positive and negative values in positive side of graph in Highchart?
- highcharts build map with a set of values and display another set of values as labels
- In Highcharts after zoom in and zoom out some of the x-axis values are not display
- Highcharts - Stacked Bar Column - Total Value of Stacked Bar not Correct with Negative and Positive Values
- How to update new plotline values instead of removing and adding new ones in highcharts
- Highcharts - How to remove connecting line between fixed tooltip and point
- Highcharts line chart won't display line chart in IE
- display content on highcharts Xaxis and Yaxis title in form of subscript and superscript
- Highcharts - Column With Negative Values - Column Color
- Highcharts - Issue with negative values when displaying multiple axes
- Ajax and Highcharts - Display 'loading' until data is retrieved, then populate chart
- Highcharts shared tooltip for line series and scatter plot not working
- Highcharts - Display only year in x axis and stop auto formatting
- Change Datalabel Color, Rotation and Align values based on Column value in highcharts
- Creating a line graph with highcharts and data in an external csv
- Highcharts Line - When Y axis min is set to 0, connecting line isn't shown for consecutive 0 values
More Query from same tag
- In Highcharts, how to move annotations along with the chart when it changes?
- select distinct name and combine an objects property in a List<T>
- HighCharts Polar Chart: only display one quadrant?
- Disable legend item click in a Highchart defined as JSON
- EmberJS Component With Graph
- Highcharts columnrange tooltip issue
- How to make ob/Highcharts work in a symfony3 project
- Jaspersoft Studio html5 chart (highchart) xAxis label overflowing
- Highcharts - Linking two separate bar graphs together
- How to clear blank below heatmap
- Highcharts remove space around boxplot
- Highchart Download Multiple graph on individual page
- How to enable or disable a Highcharts tooltip when a button is clicked?
- Column behind column highchart
- Highcharts with JSON to customize multiple series
- highcharts heatmap drilldown link on yasix
- Highcharts bug with labels
- D3.js tooltips not displaying correctlty when generated with Highcharts
- Dynamic tooltip for Dynamic Highchart
- How to set language on highcharts.client.Chart
- Feeding a combo highchart from Google Spreadsheet or json
- Highstock points don't align with tick correctly
- Create Line in Highcharts with start and end point
- Highcharts / Highmaps with Angular - Cannot run demo
- Highcharts (highcharts-ng) with ng-repeat worked, But need to pass the data for each chart from the attributes
- Trouble setting up chartkick with flask
- Return Highcharts using Ajax and Python
- adding labels exactly above x-axis categories in highcharts
- Removing PlotLine last element
- Remove whitespace from highcharts gauge chart?