When you need to implement your own custom logic into a chart, you can create a SQL chart with the Live Query.
Let's create a line chart to show the progress in the number of rides each month. To create a complex chart with SQL, switch to the SQL tab in the editing chart window. Next do the following:
Specify the name of a new chart
Select a chart widget (in case you'd like to change it)
Run a SQL query
Choose columns for display
Specify the "group by" and "display" parameters
In the following example, we simply counted the number of
rides per month.
SELECTDATE_TRUNC('month', start) AS gr,count(*)FROMrideGROUP BY grORDER BY gr;