Thryv · Data visualization

Chart Library

18 chart types and 64 variants, all drawn by one component.

I designed this chart library by hand in Figma first, then built it in Claude Code. It drew the charts in my Ask Thryv and SMB Reporting prototypes and gave engineering code for every chart.

Role
Lead Product DesignerFigma spec to working code
Timeline
May to Aug 2026Grew out of Ask Thryv's April charts
Built with
Figma, then Claude CodeReact and ECharts
Used in
Ask Thryv and SMB ReportingBoth Ask rounds, all three SMB versions

I kept building the same charts for these prototypes, so I turned them into a shared chart library. Other designers pulled it into their own prototypes, and engineering used it for Ask Thryv instead of the outdated charts.

Which chart fits

I worked out the rules in Figma first.

I made stacked bars the default for part of a whole and kept donuts for a few slices. Each chart had to pass the four questions at the bottom.

Data Visualization (ECharts)Guidelines
The questions I wrote in Figma to choose each chart. Pick one to trace the path to it.

Color hierarchy

A new series always takes the next color.

I fixed the order so the same data keeps its color from chart to chart. Green and red are kept for up and down, never for a series.

Series orderPick a number to see a chart with that many series
Revenue by serviceLast 7 days
PlumbingHVACElectricalDrains

Stacked columns take up to four series.

Share of revenueThis quarter

Donuts take up to seven slices, best kept to five.

Up, down and no change
GreenUp or good8.0%
RedDown or bad4.2%
GrayNo change0.0%

Types and variants

One component draws every chart.

A type prop picks the chart, and a stacked column is the same component with one more prop.

18

chart types, from Line to Calendar

64

variants, each one set by props

1

component that draws all of them

JSXRevenueCard.jsx

    

Variants, each one a prop

    Pick any chart to see its code and replay its entrance.

    Rules engineering could follow

    Every chart follows the same rules.

    I wrote the rules as numbers engineering could check, and the component applies them on its own.

    Revenue over last 30 daysLast 30 days
    1. 1
      At most six ticks

      Steps snap to round numbers like 1, 2, 2.5, 5 or 10, and the axis starts at zero.

    2. 2
      Compact currency

      Axis labels read $50K or $1.5M, never $50,000.

    3. 3
      Date labels at least 60px apart

      The first and last labels pin to the edges, and inner labels drop out before they collide.

    4. 4
      Dotted gridlines

      1px, 5 on and 5 off, black at 9%, to match the Figma spec.

    Responsive and hover
    RevenueLast 30 days
    $1.11M8.0%
    This periodPrevious period
    Revenue$1.11M

    mini hides the axes, gridlines and tooltips for small spaces. Drag the edge above to resize the chart, and point at it to see its hover state.

    Motion, specified

    Every entrance runs on set timings.

    I set the timings once in the library, so a chart moves the same way in any prototype that uses it. A resize never cuts an entrance short.

    duration 1000easing 'cubicOut'durationUpdate 600
    0ms
    Every value on this timeline is the library's own timing. Drag the playhead to scrub all four charts.

    Handoff

    Engineering got code for every chart.

    I built the panels so engineers could copy just the parts they needed. I also wrote a Dev Guide and a drop-in handoff bundle with a README.

    Single seriesLine chart
    Last 30 days
    Single seriesLine chart · Dev Reference
    ChartRenderer usage
    Sample data
    ECharts config

    Engineering used my repo as the working reference and pulled code snippets from it.

    Where it was used

    The same charts in both projects.

    Ask Thryv and SMB Reporting passed their own data to one component, so their charts share its axes, motion and hover states.

    How I used AI
    • Building. I built the component, its gallery and the Dev Reference panels in Claude Code.
    • Checking. With Claude Code I cleared every lint error and added 47 tests over the axis math, formats and search before the handoff.
    • Handoff. The README tells engineers who use Claude to point it at the README and the component.
    What stayed mine

    I worked out which chart fits which question, the color ramps and the chart specs by hand in Figma first. Claude Code let me turn them into working, tested code far faster than I could alone.

    Chart Library · Thryv

    Thanks for reading.