
Chart | Data shape | Use when |
|---|---|---|
Tooltip::axis_trigger plus series data under shared axes. | Use it when several series share one x position and the user needs exact values. | |
ChartBrush plus ScatterSeries. | Use it for x-range selection. | |
ChartBrush plus ScatterSeries. | Use it for region selection. | |
ChartBrush configuration plus hit-testable series data. | Use it when users need to select or inspect a region of points. | |
DataZoom start and end percentages plus ordered series data. | Use it when the user needs to inspect a slice of a longer series without leaving context. | |
DataZoom plus LineSeries. | Use it for dashboards with focus ranges. | |
DataZoom plus LineSeries. | Use it for local inspection of long series. | |
ChartGraphic plus LineSeries. | Use it for release windows and custom callouts. | |
ChartGraphic plus LineSeries. | Use it to explain a change in context. | |
ChartGraphic rect, text, line, or circle records. | Use it for callouts, annotations, labels, and lightweight explanatory overlays. | |
MarkArea plus LineSeries. | Use it for safe operating zones. | |
MarkArea, MarkLine, and MarkPoint records attached to a chart. | Use it to explain thresholds, goals, anomalies, or operational bands directly on the chart. | |
MarkLine plus LineSeries. | Use it for goals and alert thresholds. | |
MarkPoint plus LineSeries. | Use it for incidents and milestones. | |
ChartTimeline labels and current index. | Use it to show snapshots, scenario years, deployment phases, or step-based playback. | |
ChartTimeline plus series. | Use it for phase or scenario playback. | |
ChartTimeline plus series. | Use it for step-based snapshots. | |
ChartInteraction toolbox action list. | Use it when a chart has explicit utility operations that should remain close to the data. | |
ChartInteraction toolbox actions. | Use it when a chart supports several operations. | |
ChartInteraction toolbox actions. | Use it for chart utility operations. | |
Tooltip plus ChartInteraction. | Use it for exact values across series. | |
Tooltip item trigger. | Use it for exact item readout. | |
VisualMap plus HeatmapSeries. | Use it where color represents a numeric value. |
use fission::prelude::*;
use fission::charts::{Axis, Chart, LineSeries};
pub struct ComponentsAndInteractionChart;
impl From<ComponentsAndInteractionChart> for Widget {
fn from(_: ComponentsAndInteractionChart) -> Widget {
Chart::new()
.title("Components and interaction")
.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. |