Say What You Mean: Plain-English Chart Generation in CanvasXpress
Ask an AI assistant for a "bell curve," a "manhattan plot," or "a loess fit colored by group," and you expect it to know what you mean. The hard part is not drawing those charts — CanvasXpress has always been able to. The hard part is reliably translating the words a working analyst actually uses into the exact configuration that produces the right figure, every time, without quietly dropping the part that mattered.
The CanvasXpress generation tooling just got substantially better at that, on two fronts: it now covers every chart type the engine can draw, and it understands a large, editable vocabulary of plain-English intent — so the thing you asked for is guaranteed, not left to luck.
Full chart-type coverage
Behind the natural-language generator is a corpus of example prompts paired with correct configurations. That corpus is produced directly from the engine's own example generator, so the examples are correct by construction rather than hand-written and hopeful.
The corpus now covers all of the engine's chart types — the gap of ten that were previously missing has been closed. That includes complex, non-tabular genres like fish plots of clonal evolution, genome track plots, force-directed networks, and options walls, as well as named everyday types like strip plots, slopegraphs, and population pyramids. Whatever you can render, you can now ask for in words and expect the generator to reach for it.
An intent-synonym layer: the real new idea
The centerpiece is a declarative map that turns a plain-English phrase into a canonical configuration seed — a chart type plus any fixed parameters — applied before configuration is generated. That ordering is the whole trick. Because the intent is seeded up front, it is locked in; it cannot be lost to retrieval guesswork downstream.
One mechanism covers four kinds of request that a charting engine never naturally exposed in English:
- Pure synonyms. "Bell curve," "normal curve" → a density plot. The phrase people say maps to the construct the engine has.
- Structurally identical pairs. "Pyramid" and "tornado" produce the same back-to-back-bar configuration, differing only in the chart-type name the library expects.
- Named variants of a base type. "Manhattan plot," "miami plot," and "clustree" are not separate chart types — they are scatter variants. The map routes the name to a scatter plot with the right variant parameter set, so asking by name finally works.
- Fit intents. "Loess fit," "smoothing curve," "linear regression," "trend line," "log regression," "polynomial fit" — each maps to the correct fit parameter on a scatter plot.
Here is the shape of an entry:
{
"phrases": ["manhattan plot", "gwas plot", "gwas manhattan"],
"seed": { "graphType": "Scatter2D", "params": { "scatterType": "manhattan" } }
}
Adding a new synonym is one line. The longest, most-specific matching phrase wins, so "population pyramid" and "pyramid" both resolve sensibly.
No more silently dropped intent
This work was prompted by a real and frustrating failure mode. A request like "create a loess fit of these two variables colored by class" could come back as a plain scatter plot — the smoothing curve silently gone — because the generated configuration used a parameter name that does not exist, which then got stripped out during validation. The user asked for a curve and got none, with no explanation.
Two changes fix this for good. First, the synonym layer canonicalizes the intent to real parameters before any stripping happens, so "loess fit" becomes the genuine loess parameter from the start. Second, whenever a parameter is still dropped, the tool now emits a warning that names it. An intent-bearing drop is never silent again: either the request is honored, or you are told plainly what was removed and why.
Why this is more reliable than hoping retrieval gets it right
Retrieval-based generation is good at finding a close example and adapting it, but "close" is not "correct." If no example in the corpus paired a loess fit with a color grouping, the model had to improvise — and improvisation is where intent leaks away. The synonym seed removes the improvisation for the cases that matter: a named chart type or a named fit is an explicit instruction, so the generator treats it as one, overriding its heuristic guess.
Everything else — the column analysis, the retrieval of similar examples, the parameter validation — still runs. The synonym layer simply guarantees the non-negotiable part of your request before the rest of the machinery gets a vote.
What it means in practice
For anyone driving CanvasXpress through natural language — in an assistant, a script, or an integration — the result is a tool that behaves the way you'd hope:
- Ask for any chart the engine supports, by its everyday name, and get it.
- Use the vocabulary of your field — "manhattan plot," "bell curve," "trend line" — and have it understood.
- Trust that a fit, a smoothing curve, or a named variant you asked for actually appears in the output.
- When something can't be honored, see a warning instead of a quiet omission.
The design is deliberately boring in the best way: a flat, editable map of phrases to seeds, a corpus that mirrors exactly what the engine can draw, and a hard rule that intent is either delivered or declared. Saying what you mean should be enough — and now it is.