Home > front end >  how to remove extra data point from x-axis in highcharts
how to remove extra data point from x-axis in highcharts

Time:02-24

i am plotting data in highcharts for particular id's, but on x-axis showing extra data points, i only want specific data on x-axis ,i don't know how to remove extra data points. Please help. Thank You. Attached image

CodePudding user response:

You need to parse your data and provide x value as a string to make it work.

const parsedData = initialSeries.map(s => ({
    name: s.name,
    data: s.data.map(d => [d[0].toString(), d[1]])
}));

Demo: https://jsfiddle.net/BlackLabel/d9cmqbsp/

  • Related