“Why not just use a ready-made chart library?”

“Because a library decides how charts behave, and we need to decide that ourselves. Our own charts are easier to control and customise.” — Developers
On a consumer insights platform, we were building Storyteller, a report builder that needed a lot of data visualisation. The first question was which chart library to use. We decided to build our own.

That answer turned a simple chart request into a project I led from the first audit to the AI rules, and one of the most interesting challenges of that year.

What I learned along the way: designing a chart system means writing rules for data you can't predict, rules that developers and AI can follow without a designer in the room.

The problem

Which chart types do we need? Where will they be used? What data will they show, and how should they adapt? And many other questions before we started building the charts.

Charts had to work in three places:
  • Dashboards, like the Trends Discovery tool, where users explore and compare market trends. The chart depends on whatever data the API sends.
  • Storyteller, a report builder where AI generates reports from any user prompt. One chart might show 2 items, the next one 50.
  • PowerPoint exports of those reports, on fixed-size slides. It's like putting something interactive on paper: what do you show when nothing can be hovered?
The same component had to handle
  • Volume: 2 items or 30
  • Labels: short names or 60-character names
  • Values: very close or very different values, zeros, and tiny values that almost disappear
  • Space: a full-width dashboard, half of a slide, or a fixed-height PowerPoint page.
One chart component in the centre, surrounded by open questions about chart types, data, sizes and places where charts appear.

Research and early decisions

I didn't start from a list of charts. I started from what people actually needed:

  • Product Audit: I reviewed every chart already in the platform, what data each one showed and how.
  • Users: I talked to analysts, strategists and market researchers about which charts they trust and which ones confuse them.
  • Team: I aligned with developers and product on what we could build and maintain.
  • Library or our own: my audit pointed to Apache ECharts, which covered most of our cases. The developers' audit showed that our own components would be cheaper and more flexible. The price: every new chart type and edge case became our work.

The result: 9 core chart types, from bars, groups and stacks to donut, line and quadrant.
Why these? The choice followed the data: survey answers, compared across audiences, markets and time. Each type answers one question about it:
Question Chart type
How do answers compare? Vertical bars; horizontal bars for long answer labels
How do audiences differ? Bar groups, e.g. the same answer by age or country
How do answers split inside each audience? Stacks
What share of one total? Donut, only for a few slices
How does it change over time? Line
Where does each item sit on two metrics? Quadrant, e.g. growth against size in Trends
There is no universal chart: the right type depends on the data and on what people need to read from it, so start by understanding the platform and its users.

Layout and sizing

First, I defined the rules for the chart frame: general styles, grid, paddings and axis behaviour. Then I grouped charts with similar rules, for example vertical bars with vertical stacks, and horizontal bars with horizontal stacks. For each group, I worked out how it behaves with 1–2 items and with many.
Nine core chart types: vertical, grouped and stacked bars, horizontal stacks, groups and bars, donut, line and quadrant

Build or extend the design system

I documented every behaviour as a rule with numbers, so developers could code it and the AI could follow it. Here are the core ones.
Chart anatomy: title, chart area, axes, labels and legend, each zone with its own sizing rule

Spacing and scaling

Spacing depends on item count. Bar width stays flexible, and the space around the bars follows the data: five size rules, from 1–4 bars to 17+.

Spacing scales with the container. One formula replaced dozens of redlines: new spacing = full-size spacing × container width (%). At 50% width, a 96px gap becomes 48px. Side padding never goes below 8px.
The same 3 and 18 bars at full and half width, with the spacing formula below

Label angle

Bar width decides label angle. On wide bars, labels stay horizontal. As bars get narrower, labels turn 45° and lose lines. They never take more than 30% of the chart height, and if there's still no room, the label is cut and the full name shows in the tooltip.
Bar labels shown horizontal, at 45° with two lines, and at 45° with one line as bars get narrower

Legend behaviour

Legends only when they help. Mono charts have no legend, because colour doesn't carry meaning there.
A mono chart without a legend next to a grouped chart with a legend

Colour palettes

Colour depends on the type of question. Categorical colours separate unordered options like brands or features. Sentiment colours follow ordered scales from positive to negative, so "Definitely will not buy" is always red. Mono is for rankings on one measure. Benchmarks always stay neutral grey.
The same purchase intent chart coloured by order and by meaning, plus categorical, sentiment and mono palettes
Colour is never the only cue, though: every segment shows its value, answers keep their order, and the legend names each one, the tooltip helps with details.

Rules for AI content

In Storyteller, the AI generated report stories from any user prompt, including their charts, on fixed-height slides. No designer reviewed each chart, so my job was to turn design judgment into rules. Developers built them into product logic and into the instructions for the AI.

The first rule was which chart to use. The AI chose the chart from the question type. Some questions had one natural fit, like a grid question shown as a table. Others could work as up to three chart types: a single-choice question could be vertical bars, horizontal bars, or a donut.

Define palette by question type

In one of our early reports, “Definitely will not buy” showed up in green, just because green was the next colour in the list. But it’s a negative answer, so it should have a negative colour.

An ordered scale with positive and negative ends gets the Sentiment palette. Discrete, unordered options get Categorical. One measure across items gets Mono.
Four colour rules for AI, each with a correct and an incorrect palette example

Table instead of a chart

Data on the platform came from surveys, with question types from simple selects to open questions. A grid question asks people to rate several statements on the same scale, and its natural shape is a table. So the AI shows grid questions only as tables, and falls back to a table whenever no chart fits the data.
A grid question in a survey, no chart that fits, and the table shown instead

Edge cases and PowerPoint export

When labels collide

Our first quadrant chart showed each item as a dot with its full name. With 40 items, labels covered each other and got cut at the edge.

In the Trends tool I replaced the label with a small square showing the first letters of the first two words: "Visible Origin" becomes VO. The marker is the same size for every name, so the layout looks the same with 3 items or 40. Two items can share initials, so each trend also has its own colour, and the tooltip shows the full name. The trade-off: without hover, initials alone don't say which trend is which.
Before: a quadrant chart with overlapping full-name labels. After: the same view with fixed-size initials and a tooltip

When there's only one data point

A 30-day period in the Trends tool has one monthly data point, and a line chart with one point is just a lonely dot. Instead, the chart shows the value as a number with one line of help: expand the date range to see a trend.
One monthly value shown as a number with a hint to expand the date range, instead of a single dot on a line chart

When a segment is too small for its value

In stacked charts, some answers get only a few percent. With many segments in one bar, a small segment has no room for its value label. We set a minimum width for each segment, so even the smallest answer stays visible. When the label doesn't fit, it's hidden, and the value shows up in the tooltip on hover.

The trade-off is a small visual distortion: a 1% segment looks a bit bigger than 1%. We accepted it, because the rule applies only to tiny values and the exact number is always one hover away.

When the chart leaves the product

PowerPoint reports are static, so every interactive detail needs a static replacement. In the product, a long legend shows two lines and a "+ more" button, and the tooltip holds the details. On a slide, the legend is shown in full, and each segment gets its value as a data label. Colours, bar widths, and gaps carried over where PowerPoint allowed, and long labels follow PowerPoint's own text rules. Charts PowerPoint can't draw, like quadrants and idea maps, went in as images.

A lot was still lost in export. PowerPoint wasn't the main use case, so I pushed to use its native features as far as they went, and users accepted the compromise.
The same stacked chart in the product, with a two-line legend and tooltip, and on a slide with the full legend and data labels

Takeaways

9 chart types and one set of rules for dashboards, AI-generated reports, and PowerPoint export. A new data case meant adding or changing a rule, not redesigning a chart.
  • Test with ugly data from day one. Long labels, 30 categories, zeros and a single data point show every problem that perfect Figma examples hide.
  • Colour should carry meaning, not just difference. The palette has to know what the question is about.
  • Plan for where the chart goes next. A slide can't hover, so every tooltip and "+ more" button needs a static version.
  • Treat AI as a user of your design system. Like a new team member, it needs clear rules and a short list of what to avoid.
A chart system has to answer what happens when the data changes, the space shrinks, the chart leaves the product, or nobody designs it at all. Those answers are rules, and writing them was the real design work.