
Chart | Data shape | Use when |
|---|---|---|
Rows of open, close, low, high values. | Use it for market and range-over-time data. | |
Ordered label/value pairs. | Use it for sales or onboarding funnels. | |
Vec<(value, size)>. | Use it when a second axis adds noise. | |
Vec<(value, size)>. | Use it for event density and distributions. | |
OHLC rows. | Use it for intraday or short-range market views. | |
Five-number summary rows. | Use it when distribution matters more than averages. | |
Vec<(x, y, size)>. | Use it for three-dimensional business comparisons. | |
Vec<Vec<f32>> observations. | Use it for multidimensional comparison. | |
Five-number summary rows. | Use it for process quality and batch comparisons. | |
Vec<Vec<f32>> observations. | Use it for filtering and comparing profiles. | |
Ordered label/value pairs. | Use it when stage drop-off matters. | |
Vec<(risk, return, exposure)>. | Use it for portfolio-style comparisons. | |
Vec<(f32, f32)>. | Use it for correlation and clustering. | |
Vec<(f32, f32)> plus effect scatter styling. | Use it to make exceptions visible. |
use fission::prelude::*;
use fission::charts::{Axis, Chart, LineSeries};
pub struct ScatterAndStatisticalChart;
impl From<ScatterAndStatisticalChart> for Widget {
fn from(_: ScatterAndStatisticalChart) -> Widget {
Chart::new()
.title("Scatter and statistical")
.x_axis(Axis::category(vec!["A", "B", "C"]))
.y_axis(Axis::value())
.series(vec![LineSeries::new("Series").data(vec![1.0, 2.0, 3.0]).into()])
.into()
}
}
Area | What to decide | How to verify |
|---|---|---|
Data shape | Keep source rows in typed Rust structs, then map them into the series type shown in the example. | Unit test the mapping separately from rendering. |
Options | Choose axes, legends, labels, animation, and interaction based on the user's task. | Add a screenshot test when changing visual behavior. |
Accessibility | Provide a clear title and adjacent summary text for important trends or outliers. | Inspect the generated semantics and make sure the chart is understandable without color alone. |
Failure handling | Render an empty, loading, or error state before constructing the chart if data is unavailable. | Test empty data, partial data, and failed fetches. |
Performance | Prefer summarized or windowed data for very large datasets; keep full raw history in the data layer. | Profile frame time and interaction latency with representative data volumes. |