Explore data and create code or visuals with one click using CanvasXpress AI, and build effective prompts with Guided Autocomplete.
CanvasXpress AI: Powered by LLM
CanvasXpress AI is a feature that allows users to interact with their data using large language models (LLMs). This functionality enables you to explore data and create visualizations or code with a single click by simply describing what you want in plain English. You can use provided datasets or upload your own files via drag-and-drop.
Below are examples of how CanvasXpress AI works with different data types and visualizations.
When you describe a chart, the AI writes the spec — a validated
CanvasXpress configuration (the meta.cxplot grammar) that you can use as-is or refine.
You don't touch code. And because AI edits flow through the same pipeline as manual interactions,
every AI-generated change lands in the reproducible audit trail, so the
figure still records exactly how it was made.
The copilot is powered by the open-source canvasxpress-mcp server, which turns
plain-English requests into validated configs and also exposes the same capability over the Model
Context Protocol so external AI agents can build CanvasXpress figures.
Building your own AI tooling? CanvasXpress publishes a machine-readable knowledge base for LLMs at
/llms.txt (with the full version at /llms-full.txt),
including the minimal parameters, schema, and a working call for every graph type under
/data/md/.
Chatting with Data in CanvasXpress
Here are some examples of how to interact with CanvasXpress AI using large language models (LLMs). You can either use the provided datasets or drag and drop your own tab-delimited file into any of the CanvasXpress visualizations (currently shown as data tables for clarity). Simply describe in plain English what you want the visualization to look like, including the column names you want to use.
Examples - Update on a table
Create a Boxplot of len grouped by supp and dose showing the original data jittered.
Create a Violin plot of len grouped by supp in a vertical orientation. Rotate the sample labels 90 degrees.
Create a Bar graph of len color by supp. Orient vertically and show legend on top in two columns.
Examples - Update on a plot
Create a Scatter plot of cty and hwy color by class.
Create a Regression plot of cyl and displ.
Create a Loess fit of cty and hwy color by class.
Examples - Append on a plot
Create a Scatter plot of mpg and wt.
Create a Filled contour of mpg and wt.
Guided Autocomplete for CanvasXpress
**Guided Autocomplete for CanvasXpress** is an integrated feature designed to help users create effective prompts for configuring parameters accurately. This functionality was instrumental in generating the few-shot examples required to train our LLM model.
When you use Guided Autocomplete, there is no need to ask the LLM to generate visualizations. Instead, CanvasXpress will generate the configuration parameters needed for the visualizations. If the prompt cannot be validated, CanvasXpress will forward it to the LLM for processing.
Setting up the correct configuration isn't complicated. It's simply about translating the parameters into plain English—there's no need to craft it into poetry.
How it works
Guided Autocomplete can be enabled or disabled using a toggle widget in the chat interface. As you start typing, you'll see a set of initial suggestions for how to begin your new sentence. You can simply press the tab key to accept a suggestion. If there are multiple options available, pressing tab will select the first one in the list.
Initial Suggestions
Sort data by
Filter data where
Group by
Set the hierarchy to
Set the Sankey axes to
Transform the x-axis to
Transform the y-axis to
Transform the data to
Set the maximum value for the x-axis to
Set the minimum value for the x-axis to
Set the maximum value for the y-axis to
Set the minimum value for the y-axis to
Set the maximum value for the data to
Set the minimum value for the data to
Orient the graph
Use the style
Use the color scheme
Set the title for the graph to
Increase the font size of the graph title
Decrease the font size of the graph title
Set the color of the graph title to
Set the title for the x-axis to
Increase the font size of the x-axis title
Decrease the font size of the x-axis title
Set the color of the x-axis title to
Increase the font size of the x-axis ticks
Decrease the font size of the x-axis ticks
Set the color of the x-axis ticks to
Set the title for the y-axis to
Increase the font size of the y-axis title
Decrease the font size of the y-axis title
Set the color of the y-axis title to
Increase the font size of the y-axis ticks
Decrease the font size of the y-axis ticks
Set the color of the y-axis ticks to
Set the title for the samples to
Increase the font size of the sample title
Decrease the font size of the sample title
Set the color of the sample title to
Increase the font size of the sample labels
Decrease the font size of the sample labels
Set the color of the sample labels to
Set the title for the variables to
Increase the font size of the variable title
Decrease the font size of the variable title
Set the color of the variable title to
Increase the font size of the variable labels
Decrease the font size of the variable labels
Set the color of the variable labels to
Increase the font size of the sankey title
Decrease the font size of the sankey title
Set the color of the sankey title to
Increase the font size of the sankey labels
Decrease the font size of the sankey labels
Set the color of the sankey labels to
Rotate the sample labels 45 degrees
Rotate the sample labels 90 degrees
Rotate the variable labels 45 degrees
Rotate the variable labels 90 degrees
Color by
Shape by
Size by
Line by
Ridge by
Regression Line by
Loess Spline by
Scale the data point size
Show original data
Jitter the data
Bin the data
Hide the legend
Show the legend
Put the legend on the
Divide the legend in two columns
Fit the data with a regression line
Fit the data with a loess spline
Fit the with a quantile regression line
Overlay samples data with factor
Overlay variables data with factor
Add a red horizontal line at
Add a red vertical line at
Add a blue horizontal line at
Add a blue vertical line at
Add a black horizontal line at
Add a black vertical line at
Set the area graph
Set the area style
Join the data points with a
Hide the whiskers
Show single whiskers
Show the inner boxplot in the violin plot
Do not trim the violin plot
Position the histogram bars as
Show the density curve in histogram
Show the filled density curve in histogram
Show median line in density plot
Show histogram bars in density plot
Set the density curve in density plot to
Show the quantile lines in ridgeline plot
Show the density data points in ridgeline plot
Show filled contour
Show contourdata points
Cluster the variables
Cluster the samples
Set the bullet target variable to
Set the bullet range stack to
Set the R Axis to
Set the track names to
Set Venn groups to
Based on the initial suggestion, Guided Autocomplete will propose ways to complete the sentence. Several of these suggestions exhibit a well-defined structured format.
Example of a Structured Suggestion
Create a **`{graph}`** of **`{column}`** **`{concatenator}`**
When you begin typing your suggestion, guided autocomplete will automatically complete the sentence with the available graph types in CanvasXpress, such as bar graph, line graph, scatter plot, and more. Once you select the graph type, guided autocomplete will add the term 'of' and suggest the columns from your dataset. After you finish typing the first column, guided autocomplete will propose a comma, a period, or 'and' to help you concatenate the entries.