In Tractorscope, SQL charts run live queries against a connected database and map the result columns into visual fields such as axes, series, labels, values, or table columns.
SQL charts are the core of Tractorscope. A chart runs a query against a connected database and displays the result as a visualization.
Basic workflow
- Open or create a dashboard.
- Add a chart.
- Choose Build in Editor.
- Select the database for the chart.
- Write a SQL query.
- Run the query.
- Choose a chart type.
- Map result columns to chart fields, layers, or series.
- Adjust chart settings.
- Save the chart.
Query editor
The chart editor includes a SQL editor, run controls, formatting controls, chart preview, schema panel, and chart settings. Use the schema panel to inspect tables and columns while writing queries.
Query results
Tractorscope uses query result columns as chart fields. For example, a bar chart may use one column for the x-axis and another for values. A table chart can show many columns directly.
Filters in SQL
Dashboard filters can be used in SQL so viewers can change date ranges, aggregation periods, customers, or other values without editing the chart.
Tips
- Return only the columns the chart needs.
- Alias columns with readable names.
- Use aggregate queries for summary charts.
- Use table charts for detailed records.
- Use chart cache settings to balance freshness and database load.