Weekday hour heatmap

An hourly heatmap shows when work arrives, rather than just how much arrives in a day. In a support dashboard, that distinction matters: two weekdays can have the same total but need very different staffing during the morning. The screenshot is from Fission's chart gallery.

What the chart is for

Use one axis for weekdays and the other for hours. The cell value is the number of requests received in that interval. This keeps the time buckets comparable; changing bucket length halfway through the dataset would change what the colours mean.

Data model

The data is a Vec<(usize, usize, f32)>: weekday index, hour index, request count. The example keeps three hours to make the mapping explicit. Extend the hour labels and the indexed samples together when showing a full day.

Rust API

Field
Type
Notes
title
&str
Names the chart for the screen, accessibility tree, and test output.
x_axis
Axis
Usually Axis::category; use Axis::value() when x positions are numeric.
y_axis
Axis
Uses hour categories here; each triple's value determines the cell intensity.
series
Series
Provides the typed data model for this chart family.
width / height
f32
Optional fixed size; omit them when the chart should flex inside Fission layout.

Example

use fission::charts::{Axis, Chart, HeatmapSeries, VisualMap};

let chart = Chart::new()
    .title("Support requests by weekday and hour")
    .x_axis(Axis::category(vec!["Mon", "Tue", "Wed"]))
    .y_axis(Axis::category(vec!["09:00", "10:00", "11:00"]))
    .visual_map(VisualMap::new().min(0.0).max(100.0))
    .series(vec![HeatmapSeries::new("Requests")
        .data(vec![
            (0, 0, 32.0),
            (0, 1, 78.0),
            (1, 0, 45.0),
            (2, 2, 51.0),
        ])
        .into()]);

Interaction and animation

Only add interaction when it helps the user. Fission emits typed ChartInteractionEvent values for hover, press, release, scroll, selection, and brush actions; handle them in a reducer. Use ChartAnimation to set duration, delay, stagger, easing, and reduced-motion behavior. Those settings stay visible and testable.

Testing guidance

Test that your data maps to the series you expect. If you change how the chart is built or rendered, capture a live screenshot. To refresh the gallery image, run the ignored chart-gallery screenshot test with FISSION_UPDATE_CHART_DOCS=1; it updates docs2/site/assets/img/charts before the static-site build.

Authoring from a Fission component

Add the chart to any Fission layout, including a Card, Grid, Scroll, or responsive section.
use fission::prelude::*;
use fission::charts::{Axis, Chart, HeatmapSeries, VisualMap};

// The parent resolves display labels from its translation bundles.
fission_component! {
    pub WeekdayHourHeatmapChart<()> {
        props {
            chart_title: String,
            series_label: String,
            column_labels: Vec<String>,
            row_labels: Vec<String>,
            request_counts: Vec<(usize, usize, f32)>,
        }
    }
    view(chart, _state, _cx) =>
        Chart(
            title: Some(chart.chart_title.clone()),
            x_axis: Some(Axis::category(
                chart.column_labels.iter().map(String::as_str).collect(),
            )),
            y_axis: Some(Axis::category(
                chart.row_labels.iter().map(String::as_str).collect(),
            )),
            visual_map: Some(VisualMap::new().min(0.0).max(100.0)),
            series: vec![HeatmapSeries::new(&chart.series_label)
                .data(chart.request_counts.clone())
                .into()],
        )
}
Load the data before building the chart. Put the request or other async work in a reducer, job, service, or server route, then read the result from state in the component.

Options, accessibility, and diagnostics

Area
What to decide
How to check it
Data shape
Keep source rows in typed Rust structs, then map them into the series shown above.
Test that mapping separately from chart rendering.
Options
Pick axes, legends, labels, motion, and interaction to answer the screen's question.
Add a screenshot test when the chart's appearance changes.
Accessibility
Give the chart a clear title and explain important values in nearby text. Do not rely on color alone.
Inspect its semantics and check that the chart still makes sense without color.
Failure handling
Show a loading, empty, or error state when the data is not ready.
Test empty data, partial data, and a failed fetch.
Performance
Summarize or window very large datasets; keep the full history in your data layer.
Profile frame time and interaction latency with representative data.
Tags: heatmap, matrix.