Queries used to populate and format the dashboard charts can come from several sources. The most common source is MetaSQL queries. These queries return data in JSON format, and they are structured to provide the chart data, as well as the axis labels and formatting of the chart. Data can also be returned from query sets. While the query sets feature is not implemented yet, there is a plan to return dashboard data via web services, allowing us to provide a URL option when setting up datasources.
MetaSQL query in Datasource
Numerous, documented MetaSQL queries have been provided with the xtdash
package. These examples contain the correct structure and formatting to present the various chart types. Please review the MetaSQL queries in the xtdash
package to see how these queries collect data from the source and then format this data into the correct JSON format.