Wind direction and wind speed form a directional profile only after the observations are grouped intentionally. Connecting raw readings in arrival order would instead draw an arbitrary path through changing weather. The screenshot is from Fission's chart gallery.
What the chart is for
Here each direction sector has a prepared mean speed. Explain whether direction means where the wind comes from, and do not call this a wind-frequency rose: frequency is a different measure.
Data model
PolarLineSeries takes degrees and a non-negative magnitude. Zero degrees is at the top and angles increase clockwise. Points connect in input order, radius is relative to the maximum, and the final-to-first segment is not added automatically.
Authoring from a Fission component
The parent aggregates comparable observations into ordered sectors, retaining sample counts and gaps separately.
use fission::prelude::*;
use fission::charts::{Chart, PolarLineSeries};
// The parent resolves display labels from its translation bundles.
fission_component! {
pub DirectionalWindSpeed<()> {
props {
chart_title: String,
series_label: String,
degrees_and_mean_speed_ms: Vec<(f32, f32)>,
}
}
view(report, _state, _cx) => Chart(
title: Some(report.chart_title.clone()),
series: vec![PolarLineSeries::new(&report.series_label)
.data(report.degrees_and_mean_speed_ms.clone())
.into()],
)
}
Testing and accessibility
Test north-sector wraparound, calm conditions and sparse sectors. Provide sector counts, reporting period and exact speeds outside the image. Keep the radial rescaling in mind when comparing different reports.