mr.engineer.aec
Posts: 6
Joined: Tue May 30, 2023 1:35 am

How to create line chart by random points (unorrdered) ??

Hi guys,
With default, line chart always follow labels on xAxis.
But like this pic, How to create line which unorrdered labels on xAxis ?
Labels on xAxis is datetime, yAxis is number values.
Thank in advance!
Image
User avatar
dawid.d
Posts: 835
Joined: Thu Oct 06, 2022 11:31 am

Re: How to create line chart by random points (unorrdered) ??

Hello,

Welcome to our forum and thanks for contacting us with your question!

I'm sorry, but I don't quite understand what you want to achieve. Can you describe it in a little more detail? Do you mean that you would like to display on the x-axis only the values on which the points on the chart are?

I'm waiting for your reply
Thanks!
Dawid Draguła
Highcharts Developer
mr.engineer.aec
Posts: 6
Joined: Tue May 30, 2023 1:35 am

Re: How to create line chart by random points (unorrdered) ??

Hi,
example: i have labels: #7520 #7521 #7522...
i want to draw line with start point: #7520 and end point: #7522.
By the way, I want to ask: my labels data on xAxis >3000 but chart only visible about ~1000 labels.
Why and how ?
Many thanks !
Image
User avatar
dawid.d
Posts: 835
Joined: Thu Oct 06, 2022 11:31 am

Re: How to create line chart by random points (unorrdered) ??

I'm sorry, but unfortunately, I still can't understand the issue. You've written that the x-axis is of datetime type, meanwhile, you are displaying successive four-digit numbers with # prefix. Can you send a demo showing this issue using e.g. jsfiddle? Maybe I will understand it from the context.
Dawid Draguła
Highcharts Developer
mr.engineer.aec
Posts: 6
Joined: Tue May 30, 2023 1:35 am

Re: How to create line chart by random points (unorrdered) ??

dawid.d wrote: Wed May 31, 2023 10:34 am I'm sorry, but unfortunately, I still can't understand the issue. You've written that the x-axis is of datetime type, meanwhile, you are displaying successive four-digit numbers with # prefix. Can you send a demo showing this issue using e.g. jsfiddle? Maybe I will understand it from the context.
1,2,3,4... number are points. Points to create line. Not is number.
I am using highcharts:
On xAxis:
label 1: #7520; label 2: #7521; label 3: #7522...
I have value at label 1 and 3. I want to drawing a line from label 1 to label 3.
Meanwhile, i see chart will connect: label 1 to label 2 to label 3. So i need value at label 2. But i don't have.
Sorry because i don't have jsfiddle.
User avatar
dawid.d
Posts: 835
Joined: Thu Oct 06, 2022 11:31 am

Re: How to create line chart by random points (unorrdered) ??

Hi,

You can enter points as 2D arrays where the first value is X and the second is Y. This way you can skip some values on the X axis. See the demo below.

Demo: https://jsfiddle.net/BlackLabel/2pbykjou/

I hope you will find it useful
Regards!
Dawid Draguła
Highcharts Developer
mr.engineer.aec
Posts: 6
Joined: Tue May 30, 2023 1:35 am

Re: How to create line chart by random points (unorrdered) ??

dawid.d wrote: Thu Jun 01, 2023 7:58 am Hi,

You can enter points as 2D arrays where the first value is X and the second is Y. This way you can skip some values on the X axis. See the demo below.

Demo: https://jsfiddle.net/BlackLabel/2pbykjou/

I hope you will find it useful
Regards!
Thanks for your enthusiastic help, the problem I understood.
By the way, how can I use multiple labels on xAxis ? my labels are > 3000 items
User avatar
dawid.d
Posts: 835
Joined: Thu Oct 06, 2022 11:31 am

Re: How to create line chart by random points (unorrdered) ??

Do you mean that not every tick is displayed for you, only some are skipped? If so, it's because they don't all fit on the axis and to prevent overlapping.
Dawid Draguła
Highcharts Developer
mr.engineer.aec
Posts: 6
Joined: Tue May 30, 2023 1:35 am

Re: How to create line chart by random points (unorrdered) ??

dawid.d wrote: Mon Jun 05, 2023 12:13 pm Do you mean that not every tick is displayed for you, only some are skipped? If so, it's because they don't all fit on the axis and to prevent overlapping.
Image

image if can't view: https://i.ibb.co/GdvFbYS/New-Bitmap-image.png

I test with > 3000 row in excel to labels on xAxis but only 946 labels on xAxis.
Is there a limit to the number of labels? Or did I do something wrong?
User avatar
dawid.d
Posts: 835
Joined: Thu Oct 06, 2022 11:31 am

Re: How to create line chart by random points (unorrdered) ??

Hi,

I'd have to see your chart options to say exactly what's causing this. For now, I think it may be due to the incredibly wide scrollable plot area, which causes rendering errors. See the demo below.

Demo: https://jsfiddle.net/BlackLabel/sjkv0eo8/
Dawid Draguła
Highcharts Developer
mr.engineer.aec
Posts: 6
Joined: Tue May 30, 2023 1:35 am

Re: How to create line chart by random points (unorrdered) ??

dawid.d wrote: Tue Jun 06, 2023 7:59 pm Hi,

I'd have to see your chart options to say exactly what's causing this. For now, I think it may be due to the incredibly wide scrollable plot area, which causes rendering errors. See the demo below.

Demo: https://jsfiddle.net/BlackLabel/sjkv0eo8/
Many thanks!
Looks like I did something wrong, I'll be back if I have any questions.
Once again thank you for your support.

Return to “Highcharts Usage”