score:1
basic on your yaxis.max settings we can check which points with stacktotal higher than setting are visible and what categories they have assigned.
let ar = []
chart.series.foreach(s => {
s.points.foreach(p => {
if (p.stacktotal > chart.yaxis[0].datamax * 0.3){
ar.push(p.category)
}
})
})
when we have an array of visible categories as a next step we need to get the unique values from it.
let xaxiscat = [... new set(ar)];
as a final step, we can set the new xaxis.max as a length of this array and categories to this array.
demo: https://jsfiddle.net/blacklabel/y92usjvf/
this is a solution without changing the data for your particular case.
score:0
make your xaxis.categories
dynamic and dependent on your data collection's length
pseudo:
- get maximum length of columns in every row of your data.
- set that length to your
xaxis.categories
so that it'll only match the data you provided.
Source: stackoverflow.com
Related Query
- Hide categories with value below than specific value Highcharts
- Highcharts with data from table, how to add custom marker for specific value from specific series?
- HighCharts - two Y-axis, one with max value
- Highcharts - How to hide series name and Y value in tooltip
- Highcharts chart with 'datetime' xAxis - use categories on drilldown
- Highcharts buggy with more than 999 items in series data?
- How to put different categories value on X-Axis with in high-chart
- Highcharts - Global configuration with common code and unique data & Headings
- HighCharts Hide specific context Menu items
- Difference between highcharts and highstock during real time trace and xAxis with max value
- Highcharts Change Bar Background Color Based on categories value
- highcharts remove gap (column) with zero value
- Adding round corners to Highcharts Bar Chart with stacked bars when value is 0
- HighCharts - Show categories in x axis intead of the value of x in Bubble Chart
- Hide Data Labels in Pie Chart below 400px width - Highcharts
- Highcharts show the same yAxis start and end value with multiple data series
- highcharts - error when updating a series to have less categories than previously
- Negative value for categories axis in highcharts
- Display multiple points with exact same value in scatter HighCharts
- How to highlight specific Point with Highcharts Js
- Highcharts with range out of bound value highlight with different color
- highcharts find point with given x value
- Highcharts random realtime with detecting too high value
- How to suppress items with NULL value from HighCharts legend
- Highcharts zooming on x-axis with specific labelling
- passing formatting JavaScript code to HighCharts with JSON
- Highcharts - Cannot set x-axes categories in column charts with negative values
- Highcharts area chart hide graphs with one data point
- HIghcharts column graph with more than 50 data points
- Highcharts column chart color by single color but with different brightness level as per respective column value
More Query from same tag
- change json value's datatype in javascript
- Highcharts: How to display each column as a separate series?
- highcharts-angular dynamically update from DB
- Highcharts - change group padding and column width on category axis
- Pie Chart is not showing correct value due to asynchronous data retrieve in Angular JS
- (Very) hard to find Highcharts error
- Tooltip Highcharts in hybrid application
- How would I fill a table from highchart data?
- Huge memory leak in Highcharts - Create and destroy lacks memory?
- how to add height and width to highchart dynamically
- Adding Multiple HighCharts on one screen Angularjs
- how to pass datalabels along with data to show it in tooltip in highchart
- highstock - control when tooltip appears
- Highstock Time series with uneven data set distrubition
- Highcharts.js question: is it possible to add blank space from the left and right side of chart that will be visible only during panning?
- Highcharts - Drag to move on xAxis
- How to position highcharts tooltip above chart with outside:true
- When i use highcharts then my DataTable lost his functionality.
- Highcharts 24 hours displayed on x axis
- Alias "ext.highcharts.HighchartsWidget" is invalid error in yii highchart
- canvas image gets blurry
- Creating dynamic Highcharts based on an array
- Plot Option in High Charts
- HighCharts Semi-Pie Circle
- disabled zooming when scrolling the mouse in the tooltip of scatter plot highcharts
- Highchart axis 2 decimal places
- Highcarts won't redraw after fetching data from axios request in VueJS
- how to make barchart from date 1 until 31 with different value?
- Perfomance issue highchart graph & socket.io
- Angular - Custom DaterangePicker in Highchart