score:24
Set proper styles for that labels, see API.
Example:
xAxis: {
labels: {
style: {
textOverflow: 'none'
}
}
}
score:0
You only need to add textOverflow property as none like the given code below to get the first and last tick value fully visible.
xAxis: {
labels: {
style: {
fontSize: '9px',
color: '#a1a5aa',
textOverflow: 'none'
}
}
}
score:2
Try override the default behavior by yourself.
xAxis: {
labels: {
useHTML: true,
formatter() {
let label = this.value;
let title = this.value;
let style = `text-overflow: ellipsis; overflow: hidden;`; // <- YOUR OWN STYLE
return `<div style="${style}" title="${title}">${label}</div>`;
}
},
},
Style reference: https://makandracards.com/makandra/5883-use-css-text-overflow-to-truncate-long-texts
score:2
For a bar chart, I used the following xAxis definition to get long category names to appear inside the plot area (above the bar) and without wrapping or truncating with ellipses:
'xAxis' => [
'categories' => ['long category one', 'long category two', 'etc'],
'labels' => [
'align' => 'left',
'x' => 3,
'y' => -5,
'style' => [
'fontSize' => '12px',
'textOverflow' => 'none',
'whiteSpace' => 'nowrap',
],
],
],
Found the whiteSpace setting in the docs.
Source: stackoverflow.com
Related Query
- How to prevent highcharts from shortening labels with ellipsis
- Highcharts - How to prevent long title with line break from overflowing subtitle
- Highcharts Column chart with drilldown, remove hyperlink like formatting from x-axis labels
- How to populate a Highcharts axis with string formatted data from a PHP array
- How do I prevent Highcharts from truncating categories?
- How to remove the value and number labels from Highcharts angular gauge
- How can I make a graph with highcharts from csv file?
- Highcharts - How to make a scatter plot with multiple series from HTML table
- How to deal in Highcharts with special characters from CSV file?
- How to suppress items with NULL value from HighCharts legend
- How can I deal with Highcharts inline styles to prevent Content-Security-Policy violations?
- Highcharts bar with negative stack: how to position data labels
- How can I display crosshair labels on top of the chart with Highcharts
- How to use highcharts in reactjs with fetched data from API
- Prevent from executing previous JavaScript with turbolinks and highcharts //LazyHighCharts
- how to prevent highcharts tooltip popup from hiding, on graph area or browser window resize?
- Fomatting labels on Y-axis in Highcharts with Data from HTML table
- how to : limit xaxis labels in highcharts to prevent overlap
- How to have multiple highcharts with different series data in vuejs without repeating code
- Highcharts - Scatter plot: How to send information from clicks to a function with information about the click as parameters
- How can I prevent Highcharts from displaying decimal intervals in between x-axis ticks?
- How to replace x-axes with our own timestamp data from API in Highcharts using highstocks
- how to make chart real time with 2 line and get data from php with highcharts
- Parsing JSON for use with Highcharts using jquery .parseJSON or JSON.parse: how to remove quotes from function calls for formatters?
- Getting numbers on Y-axis to show up as percentages with code from a Highcharts code generator tool?
- HighCharts - Angular, how to get y axis labels on the vertical lines drawn from x axis
- How to fix formatting of axis labels in Highcharts when surrounding the contents with div?
- How to make multiple Y-axis with incoming series of data from database using Highcharts
- Highcharts with data from table, how to add custom marker for specific value from specific series?
- How to draw a chart from one array of data and make labels on the chart from another array of data? Highcharts v.4.0.4
More Query from same tag
- Highcharts Sparkline in reactjs without Jquery
- Server-Side HighStock charts generation with NodeJS
- Highcharts Barchart Category Word breaks
- why my highchart code is not working?
- Custom Highcharts legend symbol
- How can I dynamically set new data in Highcharts?
- Highcharts Date Time With Irregular Intervals Down to Minutes
- Is it possible to use multi path symbols in highcharts?
- Highcharts pie donut with gradient
- highchart total in tooltip
- Highcharts adds duplicate xmlns attribute to SVG element in IE
- Javascript HighCharts reading from a different format
- Highcharts: set only last chunk of line as a dotted zone
- Use same directive in same view and bind different data
- Disable all UI events on highcharts
- Change in highcharts version breaks animation of elements
- How to add our own graph to Kibana?
- highcharts special marker on column chart
- How can you speed up the Highcharts network graph initial animation?
- Can't bind to 'options' since it isn't a known property of 'chart'
- Add design to plotLabel Highcharts
- How do I input bar-chart data to an overall pie-chart ? (Highcharts/ JS / jQuery)
- Highcharts: Different tick interval in the same axis
- Highcharts rangeSelector ytd
- How to use a custom download button with default printing options in Highcharts?
- highcharts issues in pie chart with gradient fill
- Datalables alignment doesnt work in Highchart Timeline
- HighCharts remove $ and % symbols from custom html table when creating graph
- how to always show markers in zoomable datetime charts in highcharts?
- Highcharts capture selection