At the moment, it’s not possible to apply filtering directly within a chart shortcode.
This is because all advanced column filters and dynamic placeholders (such as VAR1
, VAR2
, etc.) are designed to work only with tables, not with standalone charts.
That said, there’s a simple workaround you can use to pre-filter a chart using its source table on the same page.
VAR
Place the table shortcode on the same page as the chart.
You can use the same table across different pages, each with its own pre-filtered value by adding a dynamic placeholder like this:
[wpdatatable id=1 var1=your_value]
(Replace 1
with your actual table ID, and your_value
with the filter value you want.)
Enable the “Follow table filtering” option in the Chart Wizard.
This makes the chart respond to the filtered state of the table.
(Optional) Hide the table on the front-end.
If you only want to display the chart, you can hide the table using CSS or our recommended method:
In the end, the chart will be pre-filtered using the VAR
value passed through the table shortcode — and the table itself can remain hidden if needed.