Daily sales calendar

Sales often follow a weekly pattern that a simple total hides. A calendar keeps each day's sales in its weekday position, making it easier to see whether a promotion changed the normal pattern or merely coincided with it. The screenshot is from Fission's chart gallery.

What the chart is for

Here, sales means completed orders. Revenue is another valid measure, but requires an explicit currency and refund policy. Do not mix order counts and monetary amounts in one series; equal numeric values would describe different things.

Data model

The data pairs ISO dates with completed-order counts. Attribute each order to its completion day in the shop's reporting timezone. The short sample shows the shape of that aggregate, not a replacement for the order records that produce it.

Rust API

Setting
Type
Meaning
CalendarHeatmapSeries::data
Vec<(&str, f32)>
Converts date/value pairs into the series' owned Vec<(String, f32)>.
CalendarHeatmapSeries::range
&str, &str
Sets the displayed start and end dates.
Chart::visual_map
VisualMap
Sets the numeric colour range.
Chart::series
Vec<Series>
Adds the calendar series; Cartesian axes are not required.

Example

use fission::charts::{CalendarHeatmapSeries, Chart, VisualMap};

let chart = Chart::new()
    .title("Completed orders per day")
    .visual_map(VisualMap::new().min(0.0).max(100.0))
    .series(vec![CalendarHeatmapSeries::new("Completed orders")
        .range("2026-10-01", "2026-10-31")
        .data(vec![
            ("2026-10-01", 43.0),
            ("2026-10-02", 58.0),
            ("2026-10-03", 39.0),
        ])
        .into()]);

Authoring from a Fission component

The parent supplies the daily values. This component presents them; it does not start a request during the build.
use fission::prelude::*;
use fission::charts::{CalendarHeatmapSeries, Chart, Series, VisualMap};

// The parent resolves display labels from its translation bundles.
fission_component! {
    pub DailySalesCalendarChart<()> {
        props {
            chart_title: String,
            series_label: String,
            daily_values: Vec<(String, f32)>,
        }
    }
    view(calendar, _state, _cx) =>
        Chart(
            title: Some(calendar.chart_title.clone()),
            visual_map: Some(VisualMap::new().min(0.0).max(100.0)),
            series: vec![Series::CalendarHeatmap(CalendarHeatmapSeries {
                name: calendar.series_label.clone(),
                data: calendar.daily_values.clone(),
                start: Some("2026-10-01".into()),
                end: Some("2026-10-31".into()),
            })],
        )
}

Interaction and accessibility

A chosen day can open a filtered order list through a reducer. Keep exact totals available in text or a table so the user does not have to estimate the difference between similar colours.

Testing guidance

Test midnight boundaries, cancelled orders and repeated updates to the same order. Make the rule for refunded orders explicit before using this chart for a financial report. Check the rendered calendar at the dashboard's actual width as well as testing the aggregate values.
Tags: calendar, sales.