How to use roles for your series in Visualizer
Visualizer supports different roles that you can assign to your chart series. Each role has its own purpose and changes how your users see or interact with your charts.
In this article
Before You Start
📝 Note: The roles are defined in detail in the Google Charts documentation on roles.
Each role below is shown with a Line chart or a Column / Bar chart example.
⚠️ Important: While you create the chart, after you add the data and before you assign the custom role (annotation, certainty, etc.) to the role columns, the chart displays the error "All series on a given axis must be the same data type". This is normal. The error goes away once the columns with special roles are defined and the chart is saved.
1. Annotation
Use the annotation role to display custom text near some data points on the chart. The text is displayed by default, without any user interaction.
This example uses a line chart with three columns: Year (type string), Sales (type number) and Expenses (type number). After each of the Sales and Expenses columns, there is a dedicated Annotation column (type string) that is used as the annotation column of the chart.
Add the data columns, with an Annotation column after each of the Sales and Expenses columns.

Go to Settings tab > Series Settings, select each of the Annotation columns, and choose the Annotation Special Role for them.

Save the chart. The annotation text appears next to the data points:

2. Annotation Text
Use the annotation text role to extend the annotation role by also displaying custom text near some data points when you hover over them.
📝 Note: If your chart has an annotationText column, it must also have an annotation column.
This example uses a line chart with three columns: Year (type string), Sales (type number) and Expenses (type number). After each of the Sales and Expenses columns, there are two dedicated columns, Annotation (type string) and annotationText (type string), used as the annotation and annotationText columns of the chart.
Add the data columns, with an Annotation and an annotationText column after each of the Sales and Expenses columns.

Go to Settings tab > Series Settings, select each of the annotation and annotationText columns, and choose the Annotation Special Role/Annotation Text Role for them.


Save the chart. The annotation text appears when you hover over a data point:

3. Certainty
Certainty indicates whether a data point on the chart is certain or not. How this is displayed depends on the chart type, for example with dashed lines or a striped fill.
This example uses a line chart with three columns: Year (type string), Sales (type number) and Expenses (type number). Each of the Sales and Expenses columns has a dedicated certainty column (type boolean) that is used as the certainty column of the chart.
Add the data columns, with a certainty column after each of the Sales and Expenses columns.

Go to Settings tab > Series Settings, select each of the certainty columns, and choose the Certainty Special Role for them.

Save the chart. Uncertain data points are drawn with dashed lines:

4. Emphasis
The emphasis role emphasizes specific chart data points, displaying them as a thick line and/or a large point.
This example uses a line chart with three columns: Year (type string), Sales (type number) and Expenses (type number). Each of the Sales and Expenses columns has a dedicated emphasis column (type boolean) that is used as the emphasis column of the chart.
Add the data columns, with an emphasis column after each of the Sales and Expenses columns.

Go to Settings tab > Series Settings, select each of the emphasis columns, and choose the Emphasis Special Role for them.

Save the chart. The emphasized data points stand out on the chart:

5. Scope
Use the scope role to indicate whether a point on the chart is in or out of scope. Out-of-scope points are visually de-emphasized.
This example uses a line chart with two columns, Year (type string) and Sales (type number), and a third column, Scope (type boolean), that is used as the scope column of the chart.
Add the data columns, with a Scope column after the Sales column.

Go to Settings tab > Series Settings, select the Scope column, and choose the Scope Special Role for it.

Save the chart. Out-of-scope points are de-emphasized:

6. Style
Use the style role to style certain properties of the chart, such as color, opacity, stroke-width, stroke-color, stroke-opacity, fill-color and fill-opacity.
This example uses a column chart with two columns, Year (type string) and Sales (type number), and a third column, Style (type string), that is used as the style column of the chart.
💡 Tip: In the style column, use double quotes, for example:
"stroke-color: #871B47; stroke-opacity: 0.6; stroke-width: 8; fill-color: blue; fill-opacity: 0.2"Add the data columns, with a Style column after the Sales column.

Go to Settings tab > Series Settings, select the Style column, and choose the Style Special Role for it.

Save the chart. Each column uses the style you defined:

7. Tooltip
Use the tooltip role to add custom content to the tooltips by adding a new column to the chart and marking it with the tooltip role.
This example uses a column chart with two columns, Year (type string) and Sales (type number), and a third column, Tooltip (type string), that is used as the tooltip of the chart.
Add the data columns, with a Tooltip column after the Sales column.

Go to Settings tab > Series Settings, select the Tooltip column, and choose the Tooltip Special Role for it.

Save the chart. The custom text appears in the tooltip:

8. Interval
Use the interval role to display a range around the data points of a series, such as a minimum and maximum or a confidence interval. Add one or more columns of type number next to your data column, then go to the Settings tab > Series Settings, select each interval column, and choose the Interval role.
