SQL: Diagram query

Shows an sql-query as a graph, just like the dashboard widget, with the same configs as the sql-subselect field.

Properties

User interface

Field in show mode, when rendering a line-chart.

image.png

Due to its nature this field has no special editing mode.

Configuration

[INSERT IMAGE]

Either, write an sql-query that fetches the exact data to be shown, as described here.

Or, write a simple sql-query that fetches the lines of data and select render-mode "Parse listed data".

Select a graph type, remember that the expected structure of the data is different for circle- and xy-graphs.

Parse listed data

This option parses the given data in the following way.

Example

This is data generated by the query: SELECT DATE, CATEGORY, AMOUNT FROM data_demoentity ORDER BY DATE ASC

Date Category Amount
01/01/2024 Category 1 10
01/01/2024 Category 2 0
01/01/2024 Category 3 15
01/02/2024 Category 1 20
01/03/2024 Category 2 20
01/04/2024 Category 1 30
01/04/2024 Category 2 10
01/04/2024 Category 3 15

This will be transformed to this, when rendering an xy-graph.

Title Category 1 Category 2 Category 3
01/01/2024 10 0 15
01/02/2024 20    
01/03/2024   20  
01/04/2024 30 10 15

Developer info


Revision #2
Created 1 April 2025 14:22:39 by Theis Villumsen
Updated 28 July 2025 13:45:06 by Theis Villumsen