Our Biggest Sale Is Here
Up to 70% Off
Get the Deal

How to make a chart follow table filtering in wpDataTables

Say you publish website traffic for all your markets in one table, with a chart of hits per country below it, and a visitor only cares about Austria and Canada. When they filter the table by country, a chart that follows table filtering redraws at once and shows only those two countries. The visitor explores the data in the table, and the chart keeps up without any extra setup on the page.

What does following table filtering do?

A chart that follows table filtering redraws with the rows that the table on the same page shows after visitors filter it with column filters. It helps in two cases:

  • Visitors should chart only part of the data, for example one product type or one date range.
  • The table is large and uses server-side processing. Charting many thousands of rows at once would overload the chart and the page.

How do I turn on following table filtering?

Select Follow table filtering on the Data range step of the chart wizard, save the chart and put it on the same page as its table.

  1. Open the chart. Create a chart or open one for editing, and go to the Data range step.
  2. Keep all rows. Leave Row range at All rows. The checkbox is available only then.
  3. Turn it on. Select Follow table filtering.
  4. Save the chart. Go to the last step and click Save chart.
  5. Add both to a page. Paste the table’s and the chart’s shortcodes into the same post or page.

When visitors filter, sort or page through the table, the chart redraws with the rows they see.

Video: turning on Follow table filtering and filtering the table on a page.

Does it work with several charts on one page?

Yes, every chart on the page that follows table filtering redraws, even when the charts use different engines. Combine it with grouping to add up the filtered rows with the same label, for example one total per country.

Excel-like tables don’t support charts that follow table filtering. Use the standard table view on that page, as listed in standard vs Excel-like tables.

What should I remember about following table filtering?

Select Follow table filtering with All rows on the Data range step, save the chart and put it on the same page as its table. The chart then redraws as visitors filter the table, works with several charts and engines at once, and combines with grouping.

Wait, Before You Download!

To get your hands on wpDataTables Lite, please enter your email address below. We’ll send you a direct download link and keep you updated on existing features along with helpful tips and tricks!

By continuing, I accept Privacy Policy and T&C
Mail Box