score:1
Accepted answer
the problem is that vertical axis add space on the left size, but doesn't add on the bottom. i would wrap labels for a better readability: http://jsfiddle.net/w53woene/2/ - otherwise it may happen that you will have so long label that chart will get 0 pixels for plotting area.
if you really need non-wrapped text, then i would wrap axis.prototype. getoffset
to add extra space:
(function(h) {
h.wrap(h.axis.prototype, 'getoffset', function(p) {
p.call(this);
if (this.isxaxis) {
var lasttick = this.tickpositions[this.tickpositions.length - 1],
lastlabel = this.ticks[lasttick].label,
height = lastlabel.getbbox(true).height;
this.labeldiff = height - this.chart.marginbottom;
if (this.labeldiff > this.chart.axisoffset[2]) {
this.chart.axisoffset[2] = this.labeldiff;
} else {
this.labeldiff = 0;
}
} else {
this.offset -= this.chart.xaxis[0].labeldiff;
}
});
})(highcharts)
and live demo: http://jsfiddle.net/vwegeuvy/
Source: stackoverflow.com
Related Query
- Slanted highcharts axis labels overlap with legend
- Highcharts - with datetime axis labels overlap
- In the following code i want to show the WHOLE names on x axis nd dont want them to overlap with the legend
- Replace axis labels with custom in highcharts r
- Highcharts datetime axis overlap with a long time series
- Highcharts drilldown to pie chart - Clicking on axis label with multiple series causes pie charts to overlap
- Highcharts and EXTJS 3: Labels in x axis overlap
- Is it possible to make a table with y axis labels of Highcharts bar chart?
- X axis labels overlap tooltip in column chart in highcharts
- How to fix formatting of axis labels in Highcharts when surrounding the contents with div?
- Remove Highcharts chart Y axis labels when legend clicked
- Width for labels on x Axis with grouped Categories in Highcharts
- Highcharts multiple axis with custom labels
- How to prevent highcharts from shortening labels with ellipsis
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- Highcharts - Long multi-line y axis labels causing following label to be removed
- Highcharts Column chart with drilldown, remove hyperlink like formatting from x-axis labels
- Highcharts stacked bar chart hide data labels not to overlap
- highcharts - removing decimal places on Y axis with only one point
- Highcharts crosshair with labels on axes
- Highcharts blank chart with x and y axis
- Highcharts Legend Overlaps with X-Axis
- Highcharts label format with tickPositioner in a datetime x Axis
- In highcharts, is it possible get the exact position of x axis labels for overlap detection purpose?
- Highcharts connecting scatter chart and pie chart with single legend
- Highcharts v3.0.1 problems with rotating data labels in IE8 and jQuery v1.7.1
- Legend and Axis titles not showing in Highcharts Graph
- Legend and Axis titles not showing in Highcharts Graph
- Highcharts - Global configuration with common code and unique data & Headings
- Highcharts - Multiple Axis Graph not displaying labels
More Query from same tag
- Can we increase the height of tooltip anchor in Highcharts
- how do you change the color of cells in highcharts heatmap?
- Sending Ember Highcharts events back to parent component
- HighCharts: context menu hidden for small charts
- Can't get drilldown module to work in highcharts in typescript
- Highcharts: picking points in one chart and have the same points highlight in other charts
- Blend modes for overlapping chart series?
- How to move tooltip position in Highchart?
- How to pass a JavaScript variable to JQuery
- Highcharts - Zoom to secounds?
- Highcharts stacked bar data from CSV
- Highstock Not showing max data value without Zoom
- javascript highcharts builder function
- Highcharts gauge incorrectly rendering label values
- Building HighCharts-Export Server 2.1 Fails
- Highcharts Treemap Data Labels issue in IE & Chrome
- HighChart created before $.getJSON
- How to remove margin gap in area spline chart for highcharts?
- Motion Bubble Chart
- High charts X-axis labeling
- How to highlight specific Point with Highcharts Js
- Highcharts - set column width dynamically
- Highcharts - Hide export menu in print page
- How to show data between two date range in spline chart of Highcharts?
- Highcharts: Add ONE custom label to yAxis
- Resize height with Highcharts
- How to make HighStock / HighChart scroll bar location default to the left hand side?
- Angular Highcharts dynamic import produces no additional chunk
- How can I change the color of legend points?
- How to display points by day and not time?