Customer journey graph

A customer journey is not always a funnel. People return to product details, revisit their basket and take different routes, so a graph can represent paths that a strict hierarchy cannot. The screenshot is from Fission's chart gallery.

What the chart is for

The example shows allowed page transitions, including returning from the basket to a product. It does not show how many customers take a transition. GraphEdge has no frequency field, so keep measured counts separate.

Data model

Nodes identify page types by stable IDs; edges identify source and target page IDs. The force-directed positions describe neither elapsed time nor a prescribed left-to-right sequence.

Rust API

Setting
Type
Meaning
GraphSeries::nodes
Vec<GraphNode>
Supplies stable IDs and readable labels.
GraphSeries::edges
Vec<GraphEdge>
Connects source and target IDs.
Chart::series
Vec<Series>
Presents the relationship series without Cartesian axes.

Example

use fission::charts::{Chart, GraphNode, GraphSeries};
use fission::charts::series::graph::GraphEdge;

let routes = GraphSeries::new("Page transitions")
    .nodes(vec![
        GraphNode {
            id: "catalog".into(),
            name: "Catalog".into(),
            value: 1.0,
        },
        GraphNode {
            id: "product".into(),
            name: "Product details".into(),
            value: 1.0,
        },
        GraphNode {
            id: "cart".into(),
            name: "Basket".into(),
            value: 1.0,
        },
    ])
    .edges(vec![
        GraphEdge {
            source: "catalog".into(),
            target: "product".into(),
        },
        GraphEdge {
            source: "product".into(),
            target: "cart".into(),
        },
        GraphEdge {
            source: "cart".into(),
            target: "product".into(),
        },
    ]);

let chart = Chart::new()
    .title("Customer navigation paths")
    .series(vec![routes.into()]);

Authoring from a Fission component

Prepare the records before building the chart, then pass them into a presentation component. Loading and failure states belong to the parent workflow rather than an implicit request made during a build.
use fission::prelude::*;
use fission::charts::{Chart, GraphNode, GraphSeries};
use fission::charts::series::graph::GraphEdge;

// The parent resolves display labels from its translation bundles.
fission_component! {
    pub CustomerJourneyGraphChart<()> {
        props {
            chart_title: String,
            series_label: String,
            nodes: Vec<GraphNode>,
            edges: Vec<GraphEdge>,
        }
    }
    view(graph, _state, _cx) =>
        Chart(
            title: Some(graph.chart_title.clone()),
            series: vec![GraphSeries::new(&graph.series_label)
                .nodes(graph.nodes.clone())
                .edges(graph.edges.clone())
                .into()],
        )
}

Testing and accessibility

Check backward transitions and repeated visits, and distinguish an allowed route from an observed route. A missing observation must not silently remove a route that the product still supports.
Provide a readable connection list as an alternative to tracing lines. If a selection opens details, dispatch it through a reducer and identify the record by its current stable ID.
Tags: graph, journey.