Hi,
You can implement this requirement using the Charts module (AnyChart) with a microflow data source that prepares aggregated data based on filters. This is the standard pattern used in Mendix for dynamic dashboards.
Create a Non-Persistable Entity (for example ChartDataset) with attributes like:
Month (String or DateTime formatted to Month)Category (String / Enum)Status (Enum)Count (Integer)This entity will hold the aggregated result used by the chart.
Create a microflow (for example MF_GetChartData) and set it as the data source of the chart.
In this microflow:
DashboardFilter).ChartDataset object and set:If the dataset is large, the recommended approach is to use OQL with GROUP BY to calculate the counts efficiently.
Example idea:
SELECT
DATEPART(MONTH, CreatedDate) AS Month,
Category,
Status,
COUNT(*) AS Count
FROM Form
GROUP BY Month, Category, Status
Then convert the result to ChartDataset objects.
Add a Column Chart widget and configure:
Data source → Microflow
Microflow → MF_GetChartData
Chart configuration:
MonthCategory or StatusCountCreate a Filter helper entity like DashboardFilter with attributes:
CategoryStatusAdd dropdowns or combo boxes on the page bound to this object.
When the filter value changes:
The flow becomes:
User selects filter → Filter object updated → Chart data microflow runs → Aggregated dataset returned → Column chart refreshes.
This approach is the recommended Mendix pattern for building dynamic filtered charts without creating a custom widget.
Hi Anand Prakash
Yeah sure you can build it as pluggable widget. check out this link Widgets or else another you can check the marketplace module Advance cloumn
I hope it helps!
Hi,
If you need that level of flexibility (grouping by category, status, or both, and applying filters), it is usually easier to build the chart using a more flexible chart widget such as AnyChart or Plotly from the Marketplace rather than relying only on the default chart widgets.
A common approach is to handle the filtering and aggregation in a microflow. The microflow retrieves the form data, applies the selected filters, and aggregates the results per month. Depending on the filter selection, you can group the data by category, status, or a combination of both.
The aggregated data can then be stored in a helper entity (for example something like Month, Category, Status, Count). This dataset can be returned to the chart widget, which will simply visualize the prepared data.
When the user changes a filter, you can trigger the microflow again to retrieve and aggregate the data with the new filter values, and then refresh the chart. This allows the chart to dynamically update based on the selected filters.
If the dataset becomes large, another option is to perform the aggregation using OQL or a database view, which can sometimes be more efficient than processing everything inside a microflow.
So in general, the best pattern is to let the microflow handle filtering and aggregation, and let the chart widget focus only on displaying the data.
If this approach works for you, please consider marking it as accepted so it can help others as well. 🙂