paggetto
Posts: 8
Joined: Mon May 30, 2022 5:38 pm

how to windbarb mode to tooltip and size

Hello,
i have some problem about layout with wind area and lines.
my problem are that the graph are so little to put windbarb icon every 5 minutes for all 24h,
how i show the direction of wind a little bit small? how i can put in tooltip the windbarb icon?
i accept suggestion to view data without windbarb crossed over

this is my code:
https://jsfiddle.net/v63q10y4/

Thank you
Al.
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: how to windbarb mode to tooltip and size

Hello Al!
Thanks for contacting us with your question!

You can control the size of arrows in windbarb chart you can use a vectorLength property. If you want to "copy" the arrow to the tooltip it is a harder thing, because you have to draw this arrow as SVG, based on the existing one. You can check the demo below and try to customize it to your own.

Demo: https://jsfiddle.net/BlackLabel/v5hrn3m2/
API Reference: https://api.highcharts.com/highcharts/s ... ctorLength

Feel free to ask any further questions.
Kind regards!
Hubert Kozik
Highcharts Developer
paggetto
Posts: 8
Joined: Mon May 30, 2022 5:38 pm

Re: how to windbarb mode to tooltip and size

Hello dev,
oh ok, super! very very tanks, i think you can put in your example, windbarb with tooltip it's a good solution if you have a lot of data.
Another info dear dev team, i am looking for a put wind direction on my data, how can i import and set it?
now my data range area are by: [1655078401000, 4.8, 8.0] = [ date, low, hight (gust) ]
average [1655078401000, 6.4],
windbarb gust [1655078401000, 8.0, 81],

could be [1655078401000, 4.8, 8.0, N, NE] , or you can suggest me the better way?

Very thanks
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: how to windbarb mode to tooltip and size

Al,
To pass data to windbarb type of series you have to stick to the expected data format, described here: https://api.highcharts.com/highcharts/s ... dbarb.data
So, you have to pass to a data, an array of arrays with 3 values. In this case, the values correspond to x, value, direction. You can't pass a direction with strings like 'N', 'S' etc.

Let me know if you have any further questions.
Kind regards!
Hubert Kozik
Highcharts Developer
paggetto
Posts: 8
Joined: Mon May 30, 2022 5:38 pm

Re: how to windbarb mode to tooltip and size

Hello dear Hubert,
first to all, thank you for your explanations, yes i saw api link describe for 3 values, clear not in windbarb.

If i want put cardinal point by strings, i need create another series with only this data, or i can add to my area interval?
now area interval are time low and hight = [1655078401000, 4.8, 8.0], i can add others two vars and get it in tooltip? like this? [1655078401000, 4.8, 8.0, N, NE]

I would import into the tooltip cardinal string of wind and cardinal of gust, for cardinal gust i have in degree but i need in string.
or i need import both in degree, and after make function in javascript for covert degree in cardinals string, but the code will be long.

last info about arrows and layout:
how to modify arrow barb to km/h for correct value? now are in m/s
show all arrow over the area, not over and under, like this:

Image
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: how to windbarb mode to tooltip and size

Al,
If i want put cardinal point by strings, i need create another series with only this data, or i can add to my area interval?
I am not quite sure, what you want to achieve, but of course, you can add a fake series and do whatever you want with it.
now area interval are time low and hight = [1655078401000, 4.8, 8.0], i can add others two vars and get it in tooltip? like this? [1655078401000, 4.8, 8.0, N, NE]
Yes, of course, you can custom properties to your point. I suggest you change data from the array to the object, thanks to that you will be able to add custom properties and easily handle them in tooltip.formatter.
I would import into the tooltip cardinal string of wind and cardinal of gust, for cardinal gust i have in degree but i need in string.
or i need import both in degree, and after make function in javascript for covert degree in cardinals string, but the code will be long.
I suggest making a function before a chart configuration and using this function in a proper place.
how to modify arrow barb to km/h for correct value? now are in m/s
Just change the value suffix to km/h and use values for kilometres - there is no precise unit in windbarb.

Kind regards!
Hubert Kozik
Highcharts Developer
paggetto
Posts: 8
Joined: Mon May 30, 2022 5:38 pm

Re: how to windbarb mode to tooltip and size

Hello Hubert,
i do everything with a function, thank you!
it's one param to show all arrow one next one over the area or line? now by default show over and under?
i think by system show where they have "space" to show it.

thanks for all
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: how to windbarb mode to tooltip and size

Al,
I'm not quite sure what exactly you want to achieve. If you could provide me with some more information, like an image, gif or something like that - it would be really helpful.

Kind regards!
Hubert Kozik
Highcharts Developer
paggetto
Posts: 8
Joined: Mon May 30, 2022 5:38 pm

Re: how to windbarb mode to tooltip and size

Hello Hubert,
it would be like your meteogram demo, all icons on the top, in this case put all wind barb.
One consecutive to the other, like for labels.
i create one example here Image

thak you,
very kindly
Al.
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: how to windbarb mode to tooltip and size

Al,
Your image is not working, can you attach an image once again and check if it is working?

Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Usage”