The type of Cartesian graph is thought to represent values in time series of time.

1 Example

This example shows the total sales per month and filtering per year.

You see the parameterization of the box:



  1. Selector type of Cartesian graph.
  2. Column of the sentence with temporary value, in this case the month of the invoice the_month.
  3. Filter by combo of the column the_year and thus be able to filter the graph by years.
  4. SQL statement to execute, in this case:
Copy
<select>
    <columns>
        YEAR(invoicedate)  <alias name='the_year'/>,
        MONTH(invoicedate)  <alias name='the_month'/>,
        SUM(invoice.total) <alias name='the_total' />
    </columns>
    <from table='invoice'/>    
    <group>1,2</group>
    <order>1,2</order>
</select>

* Starting from the table of invoices and grouping by year and month.

5. In the series the column ' total' is added with the numerical value, in this case the total sales per month and year.



Combo selector of years to show monthly data per year.



The series for line type is modified



A series is added with the profit



  1. Selector type of Cartesian graph.
  2. Column of the sentence with temporary value, in this case the month of the invoice the_month.
  3. Filter by combo of the column the_year and thus be able to filter the graph by years.
  4. SQL statement to execute, in this case:
Copy
<select>
    <columns>
        YEAR(invoicedate)  the_year,
        MONTH(invoice.invoicedate) <alias name='the_month' />,
        SUM(invoiceline.quantity * invoiceline.unitprice) <alias name='the_total' />,
        SUM(invoiceline.quantity * invoiceline.unitprice) - SUM(invoiceline.quantity * track.costprice) <alias name='the_profit'/>
    </columns>
    <from table='invoice'>
        <join table='invoiceline'>
            <on>invoice.invoiceid = invoiceline.invoiceid</on>
            <join table='track'>
                <on>invoiceline.trackid = track.trackid</on>    
            </join>
        </join> 
    </from>
    <group>1,2</group>
    <order>1,2</order>
</select>

* Starting from the table of invoices and grouping by year and month.

5. In the series the column ' the_total' is added with the numerical value, in this case the total sales per month and year.

The column ' the_profit' of line type is also added.