Mingle Reporting - Macros and MQL
Introduction
This section describes how to create your own charts, graphs and tables on Mingle's Overview tab and other Mingle wiki pages using reporting macros and MQL - the Mingle Query Language.
Mingle supports macros that render charts, tables and dashboard panels. You can customize these macros using MQL to generate tables and charts that are specific to your projects.
Mingle Query Language (MQL) is a query language you can use to extract data from your project for use in reporting macros. MQL is similar to SQL, but with a simplified syntax. In a typical MQL expression you will write SQL-like syntax against your card properties and values.
{{
pie-chart
data: SELECT Feature, SUM(Size) WHERE Type=Story
}}
Embedding the above text into any wiki page in your project will render a pie chart that breaks down the size of feature groups across all cards with a type of story. (Assuming that your project has card properties named Size, Feature, and Story.)
Mingle includes several templates that come with examples of graphs, charts and tables that you can adapt to your own project. Mingle administrators can view templates by clicking the Manage templates link after signing in to Mingle.
Mingle Macro Editor
Introduction
The Macro Editor is a new feature introduced in Mingle 3.0. Using the Macro Editor simplifies the creation of charts and tables in Mingle and helps to prevent macro syntax errors. This can be especially helpful when you create rather complex macros. The Macro Editor also allows you to get quick feedback by providing the ability to preview your charts.
The Macro Editor is available to all of following macros...
- Project variable
- Average
- Value query
- Table query
- View
- Pivot table
- Stack Bar chart
- Data Series chart
- Ratio bar chart
- Pie chart
The Macro Editor is only available to create new charts and tables, not to edit existing ones.
How to use the Macro Editor
- Click on the icon for the chart you want to create from the wiki tool bar.

- The Macro Editor will be prompted with the default parameters for the selected macro.
Please note that not all default parameters are required, but you will likely get a better result if you include them. You can differentiate the required parameters because they have an asterisk (*) next to the parameter label.

- Enter the MQL for the parameter. You can add extra parameters that are available for each macro by clicking on the '+' icon.
For the 'Stack Bar chart' and the 'Data Series chart' macros, you can add/remove the 'Series level options'. Thus if you add an additional series to the chart, the default parameters for that series will be available.

- Click on the 'Preview' link or hit the 'enter' key from the keyboard to check if you are getting the chart you are looking for. If there are any errors when previewing the chart, the error messages will be displayed in the preview section.

- If you are happy with the macro that you see in the preview, click on the 'Insert' link. This will insert the complete macro syntax with your MQL into your wiki editor.
