Answer the question
In order to leave comments, you need to log in
How to sort out the necessary data in the graph?
Hello!
How to sort data into xAxis in Highcharts? so that there are not only 4 items from the array, but everything, in this case, strings, but there may be not only strings
const data = [
["custom окт", 100, "custom 12", 120, "custom 121", 500],
["число фу", 140, "custom 12", 150, "custom 555", 300],
["20 custom", 200, "custom 22", 222, "555 окт", 400],
["еще число бу", 80, "custom 11", 0, "555 окт", 600]
];
Answer the question
In order to leave comments, you need to log in
items.reduce((acc, arr) => acc.concat(arr.filter(el => typeof el === 'string')), []);
items.reduce((acc, arr) => [...acc, ...arr.filter(el => typeof el === 'string')], []);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question