The type of Pie graph is designed to represent percentages.
This example shows the total sale and its musical genre percentage and filtering per year.
You see the parameterization of the box:
- Selector type of Pie graph.
- Column of the sentence with value to be displayed, in this case the name musical genre.
- Filter by combo of the column the_year and thus be able to filter the graph by years.
- SQL statement to execute, in this case:
<select> <columns> YEAR(invoicedate) the_year, genre.name, SUM(invoice.total) total </columns> <from table='invoice'> <join table='invoiceline'> <on>invoice.invoiceid = invoiceline.invoiceid</on> <join table='track'> <on>track.trackid = invoiceline.trackid</on> <join table='genre'> <on>track.genreid = genre.genreid</on> </join> </join> </join> </from> <group>1,2</group> <order>1,2</order> </select>
* Starting from the table of invoices and grouping by gender and year.
5. In the series the column ' total' is added with the numerical value, in this case the total sales by gender and year.