Fairly new to Grafana (have a lot of experience working in Tableau and other data visualization tools) and have built a handful of basic Time Series charts to get a better understanding of how Grafana works.
Currently working with Grafana ver 8.4.2 connected to an InfluxDB database. I would like to use Grafana to create a Wind Direction & Speed timeline. Below is an example I found of the type of chart I am looking to build. Basically the wind speed is plotted over time and then for each datapoint, the direction of the wind is represented by which way the arrow is pointing (North is up, South is down). In this example, the color represents the wind speed (higher velocity is red), however I am not really concerned about the colors right now.
Reading through the Grafana forums and doing some general web searching on similar concepts hasnât really turned up anything. Plotting the wind speed on a time based chart is fairly straightforward and I have already accomplished that, however having a custom marker that
is dynamically rotated a set amount of degrees based on a value is more complicated. I did see a couple articles and Github issues for Grafana stating that custom markers on a line chart/time series panel isnât supported - so that might already mean this is a no-go.
Is a chart/visualization like this where the marker is an image and the orientation is data-driven possible in Grafana? Looking for some clarification and guidance. If it is possible, pointing me in the direction to go and/or concepts to dig into would be much appreciated!
Thank you for the reply and some examples to take a look at! It is a pretty sweet looking visualization (originally saw something similar in the Weather Underground mobile app) and at first I didnât think would be too complex but I was probably just being naive. I will dig into those links posted and see what is possible/what I can work up.
Wind Gust/Wind Direction
Below are examples of how I am fetching Wind Gust and Wind Direction data from my InFluxDB.
The time is broken down into 10 minute windows right now. For the Wind Gust (sensor.windgust), the value for the is currently in MPH. For the Wind Direction (sensor.winddir), the value is a degree measurement (from 0° to 359°) that the wind is âoriginating fromâ. So if the wind was coming straight âout of the Northâ, then you would see a value of 0°; if the wind was coming âout of the Eastâ, then you would see a value of 90°; and so on.
I am sure I will eventually be combining these into one query, but starting out in small steps.
Want to do a little more âpolishingâ and formatting, but overall it was straightforward to get this up and working with your examples (much appreciated) and digging through the documentation!
@dutarahisu - Iâll see if I can can put something together.
The Apache ECharts documentation is pretty good and there is A LOT of examples with full code that you can manipulate and play with. Going through the examples, I actually found a similar (although more complex) version of what I wanted here.
Many Thanks. My problem is that I donât know how to access the data stored in my database. In the example mikhailvolkov posted, he uses the static data stored directly in âconst windâ. Maybe you can show/tell me how to use data from a database (influxdb) with the echarts plugin. Kind regards
@Alvaro_Villawind should be filled with hashes consisting of value as an array and symbolRotate if you need it.
Setting wind with mean values is not enough.
I would suggest trying something like this to get values from 3 columns with names time, value, and rotate and then combine them in the correct structure.
weewx/windDir.mean is the name of the data from a InfluxDB data. In this field my meteo station says me the wind direction in degrees, at the same time, InfluxDB store de time data.