With our OTbase data loaded and configured, we can create our first visualization. In this guide, we will create a Pie Chart (specifically a Donut Chart) that gives us a visual breakdown of our vendor count. Follow the instructions below to get started.
Creating A Donut Chart
- From within your Dashboards, add a new panel using the add panel button.
- Change the panel type (top right) to Pie Chart.
Configuring the Donut Chart
- Under the Query Section, select Dashboard as your data source and Source should be the table we created in the first section (See Adding a Data Source)
- Select Donut for the Pie Chart Type on the right-hand menu.
- Select Name for the label.
- Then scroll to Value Options and select Show All Values.
- Finally, under Fields, select Numeric Fields
Note: You can add a row limit (maximum number to display).
Transforming OTbase Data for the Donut Chart
We'll add three transformations to make the donut chart work correctly: Extract Fields, Add Field from calculation, and Group by.
- Add transformation: Extract Fields > hardware, auto, Replace all fields = true. This gets rid of all other unnecessary data in the localized table for this pie chart.
- Add transformation: Add Field from Calculation > Reduce row, Field Name = Vendor, Calculation = Count, Alias = Total, Replace all fields = false.
- Add transformation: Group by > vendor = group by, total = calculate by Count.
To create additional Donut charts, you can repeat steps the steps from this section or you can duplicate the chart you made above and change only the fields necessary to chart out new data.
By following these steps, you should be able to use Grafana to visualize your data in the form of tables and charts.