I have a problem with sorting points in different series with highchart, to explain my problem more Let's take this series for example:
[
{name: 'series one', value: 5 values},
{name: 'series two', value: 10 values}
]
This data in the "text" xAxis option, will cause sorting issues because the array is a different length. Even if the first series has 5 values, it needs all 10 to show correctly.
because of this problem when I'm trying to make a chart with two series that have the "text" xAxis option, the chart lebel goes to the wrong axis. sorting code that I use for example
if(this.chartAxis.x.unit === "Text") {
chartOptions.xAxis.categories = this.chartPoints.map(p =>
p.xValue).filter((v:any, i:any, a:any) => a.indexOf(v) === i).sort(function(a:any, b:any)
{ return (a > b) ? 1 : ((b > a) ? -1 : 0); });
}
if anyone has any idea how to solve this please comment.