
Field | Type | Notes |
|---|---|---|
title | &str | Names the chart for the screen, accessibility tree, and test output. |
Scene3D | Scene3D | Defines native 3D primitives, camera, light, and material data. |
width / height | f32 | Optional fixed size; omit them when the scene should flex inside Fission layout. |
use fission::three_d::{Scene3D, Vec3};
let scene = Scene3D::new()
.size(720.0, 420.0)
.camera(Vec3::new(3.5, 2.6, 5.0), Vec3::ZERO)
.ambient_light(0.45);
use fission::prelude::*;
use fission::charts::{Axis, Chart, LineSeries};
pub struct Fission3DScatterOutliersChart;
impl From<Fission3DScatterOutliersChart> for Widget {
fn from(_: Fission3DScatterOutliersChart) -> Widget {
Chart::new()
.title("3D scatter outliers")
.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. |