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 pages and cards 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
Creating a macro with the above text and inserting it into any card or 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.
- Macro markup is space sensitive and we advise you to stick to the indentation scheme specified in the examples if you write your macro by hand.
- It's highly encouraged to have fewer than 10 macros on a card or page. Loading such a card or page will slow down your system. Please be aware that in the future Mingle may prevent users from having more than 10 macros on cards or pages.
Mingle Macro Builder
Introduction
Using the Macro Builder 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 Builder also allows you to get quick feedback by providing the ability to preview your charts.
The Macro Builder is available to all of following macros...
- Project variable
- Average
- Value query
- Table query
- View
- Pivot table
- Stack Bar chart
- Data Series chart
- Daily History chart
- Ratio bar chart
- Pie chart
The Macro Builder is only available to create new charts and tables, not to edit existing ones. To edit your macro, right click on your macro. This will open a text box with your macro markup, which you can modify by hand.
How to use the Macro Builder
- Click on the icon for the macro you want to create from the editing tool bar. (This example shows how to build a table query.) The Macro Builder will open 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' button to check if you are getting the macro you are looking for. If there are any errors when previewing, an error message will be displayed in the preview section.

- If you are happy with the macro that you see in the preview, click on the 'Insert' button. This will insert the complete macro into your card or page. To edit your macro once it has been inserted inline, simply right click.

This will open a text box in which you can modify your macro markup by hand.
