I’m currently using the ‘windrose’ integration, and while it looks neat and tells me what directions the wind has been blowing, the thing it doesnt do is show me what time the wind changed direction:
Is there a way to use maybe apex charts or another integration to copy the design of the ambientweather dot-chart, so its possible to see what direction the wind was blowing at a given time during the day?
Thanks for the code. However I would propose two small improvements.:
As function you may want to use median . If you use max wind directions will be biased more in direction Northwest, if you use min in direction Northeast. Especially in cases with a big variance the bias is significant. With median the middle value is used.
For the number of ticks in the yaxis prefer a number dividable by 4 (8, 12 or 16) so that the main directions NESW are displayed on the yaxis
Best whishes
Hendrik
type: custom:apexcharts-card
header:
show: true
title: Windrichting
show_states: true
colorize_states: true
chart_type: scatter
graph_span: 2d
series:
- entity: sensor.buienradar_wind_direction_azimuth
name: Windrichting
group_by:
func: median
duration: 30m
show:
in_chart: true
name_in_header: false
apex_config:
yaxis:
labels:
formatter: |
EVAL:function(value) {
if (value > 11.25 && value <= 33.75) { return 'NNO'; }
else if (value > 33.75 && value <= 56.25) { return 'NO'; }
else if (value > 56.25 && value <= 78.75) { return 'ONO'; }
else if (value > 78.75 && value <= 101.25) { return 'O'; }
else if (value > 101.25 && value <= 123.75) { return 'OZO'; }
else if (value > 123.75 && value <= 146.25) { return 'ZO'; }
else if (value > 146.25 && value <= 168.75) { return 'ZZO'; }
else if (value > 168.75 && value <= 191.25) { return 'Z'; }
else if (value > 191.25 && value <= 213.75) { return 'ZZW'; }
else if (value > 213.75 && value <= 236.25) { return 'ZW'; }
else if (value > 236.25 && value <= 258.75) { return 'WZW'; }
else if (value > 258.75 && value <= 281.25) { return 'W'; }
else if (value > 281.25 && value <= 303.75) { return 'WNW'; }
else if (value > 303.75 && value <= 326.25) { return 'NW'; }
else if (value > 326.25 && value <= 348.75) { return 'NNW'; }
else { return 'N'; }
}
offsetX: 15
min: 0
max: 360
tickAmount: 16
grid:
padding:
left: 30
markers:
size: 5
Nice thanks! I wanted to have that ‘double north’ on the y-axis but didn’t know how and keep the O/W in there as well. Now it shows N at the bottom and the top like in the original post and the rest. Thanks for the tips!