This procedure creates categorical data visualizations. Bar charts display categories along one axis with corresponding values, and can be oriented horizontally or vertically. Pie charts show proportional relationships as slices of a circle. Legends are supported only for pie charts.
Syntax
Below is a line-by-line overview of the automation syntax. Expand each line to learn more.
create a {bar|pie} chart where
What does it do?
Begins a chart definition block.
Where does it go?
This phrase should be written on a new line.
Is it required?
✅ Yes — This phrase is required.
Does it require data?
✅ Yes — Replace the adjective with bar or pie.
Example
create a bar chart where
the categories are c
What does it do?
Provides category labels for the chart.
Where does it go?
Indented under create a {bar|pie} chart where.
Is it required?
✅ Yes — This phrase is required.
Does it require data?
✅ Yes — Replace c with a list of texts or a reference to table data.
Example
the categories are the table's cities
the values are v
What does it do?
Provides numeric values corresponding to each category.
Where does it go?
Indented under create a {bar|pie} chart where.
Is it required?
✅ Yes — This phrase is required.
Does it require data?
✅ Yes — Replace v with a list of numbers or reference to table data.
Example
the values are the table's populations
the title is "chart-title"
What does it do?
Sets the chart title.
Where does it go?
Indented under create a {bar|pie} chart where.
Is it required?
✅ Yes — This phrase is required.
Does it require data?
✅ Yes — Replace chart-title with a text string.
Example
the title is "Population of Cities"
the x label is "x-label"
What does it do?
Labels the x-axis.
Where does it go?
Indented under create a bar chart where.
Is it required?
❌ No — This phrase is optional.
Does it require data?
✅ Yes — Replace x-label with a text string to label the x-axis. The default is Categories.
Example
the x label is "Cities"
the y label is "y-label"
What does it do?
Labels the y-axis.
Where does it go?
Indented under create a bar chart where.
Is it required?
❌ No — This phrase is optional.
Does it require data?
✅ Yes — Replace y-label with a text string to label the y-axis. The default is Values.
Example
the y label is "Population"
the orientation is "{horizontal|vertical}"
What does it do?
Sets bar chart orientation.
Where does it go?
Indented under create a bar chart where.
Is it required?
❌ No — This phrase is optional.
Does it require data?
✅ Yes — Set the text as either horizontal or vertical. The default is vertical.
Example
the orientation is "horizontal"
the legend is "{enabled|disabled}"
What does it do?
Displays a legend with category names.
Where does it go?
Indented under create a pie chart where.
Is it required?
❌ No — This phrase is optional.
Does it require data?
✅ Yes — Set the text as either enabled or disabled. The default is disabled.
Example
the legend is "enabled"
the color palette is "color-palette"
What does it do?
Sets the color scheme for the chart.
Where does it go?
Indented under create a {bar|pie} chart where.
Is it required?
❌ No — This phrase is optional.
Does it require data?
✅ Yes — Replace color-palette with one of kognitos, blue, lavender, rocket, green. The default is kognitos.
Example
the color palette is "blue"
the style is "chart-style"
What does it do?
Sets the seaborn chart style.
Where does it go?
Indented under create a {bar|pie} chart where.
Is it required?
❌ No — This phrase is optional.
Does it require data?
✅ Yes — Replace chart-style with one of white, darkgrid, whitegrid, dark, ticks. The default is white.
Example
the style is "white"
the font is "font-name"
What does it do?
Sets the font family for all text.
Where does it go?
Indented under create a {bar|pie} chart where.
Is it required?
❌ No — This phrase is optional.
Does it require data?
✅ Yes — Replace font-name with a font name. The default is Raleway Light.
Example
the font is "Raleway Light"
Examples
1. Bar Chart with Direct Values
create a bar chart where
the categories are ["New York", "Los Angeles", "Chicago", "Houston"]
the values are [8419000, 3980000, 2716000, 2328000]
the title is "Population of Major Cities"
the x label is "Cities"
the y label is "Population"
the style is "white"
2. Pie Chart with Legend
create a pie chart where
the categories are ["Desktop", "Mobile", "Tablet"]
the values are [45.2, 35.8, 19.0]
the title is "Traffic Sources"
the legend is "enabled"
the color palette is "blue"
3. Horizontal Bar Chart from Table Data
create a bar chart where
the categories are the table's departments
the values are the table's budgets
the title is "Department Budgets"
the orientation is "horizontal"
the x label is "Budget ($)"
the y label is "Department"