An item chart displays categorical and hierarchical data as a set of dots. Each dot represents a data value or group of data values.
Using the Chart Config Editor, you can create item charts by starting from a column chart in Looker.
Item charts require at least one dimension and exactly one measure.
For example, you can create an item chart that shows the Inventory Item Count measure value over several different Seasonal Collection dimension values. The dots will be colored according to the dimension values.
Prerequisites
To access the Chart Config Editor, you must have the can_override_vis_config
permission.
Writing the JSON snippet
To create an item chart, start from the following JSON snippet:
{
chart: {
type: 'item',
}
}
Creating an item chart
To create an item chart, follow these steps:
View a column chart in an Explore, or edit a column chart in a Look or dashboard.
Item charts require at least one dimension and exactly one measure. Your starting chart might look something like this example:
Open the Edit menu in the visualization.
In the Plot tab, click the Edit Chart Config button. Looker displays the Edit Chart Config dialog.
Select the Chart Config (Override) section, and enter the HighCharts JSON from the Writing the JSON snippet section of this page.
To let Looker properly format your JSON, click <> (Format code).
To test your changes, click Preview.
To apply your changes, click Apply. The visualization will be displayed using the custom JSON values.
Once you've customized your visualization, you can save it.
Changing the layout style
By default, the item chart displays items in a semicircle. You can change the shape of the chart by using the startAngle
and endAngle
properties.
For example, to create a circular item chart, use the following JSON:
{
chart: {
type: 'item'
},
series: [{
startAngle: null,
endAngle: null
}]
}
To create a rectangular item chart, use the following JSON:
{
chart: {
type: 'item'
},
series: [{
startAngle: null,
endAngle: null
}]
}
Limitations and requirements
When you're using item charts, keep the following limitations and requirements in mind:
- Item charts require exactly one measure.
- Item charts require at least one dimension.
- Item charts don't support pivoted dimensions.
- If your measure values are larger than the number of dots that Looker can display, Looker adds a label below the chart that denotes how many values each dot represents.
- Item charts can only render queries with 50 rows or fewer.