Cross-Filtering in SurveyJS Dashboard

Cross-filtering is an interactive feature that lets users click a chart element (for example, a bar or pie slice) to filter all dashboard items and drill down into the corresponding subset of responses.

View Demo

Supported Visualization Types

Cross-filtering is available for the following chart types:

Enable or Disable Cross-Filtering

Cross-filtering is enabled by default. To disable it for the entire dashboard, set the allowSelection property to false when creating a Dashboard instance:

import { Dashboard } from "survey-analytics";

const dashboard = new Dashboard({
  questions: [ /* Survey questions to visualize */ ],
  data: [ /* Survey responses to aggregate */ ],
  items: [ /* Dashboard item configurations */ ],
  allowSelection: false // Disables cross-filtering globally
});

To override this behavior for a specific dashboard item, configure the allowSelection property in its visualizer object. Item-level settings take precedence over the global setting.

import { Dashboard } from "survey-analytics";

const dashboard = new Dashboard({
  questions: [ /* ... */ ],
  data: [ /* ... */ ],
  allowSelection: false, // Disable cross-filtering globally
  items: [
    {
      name: "question1",
      visualizer: {
        allowSelection: true // Re-enable cross-filtering for this item
      }
    },
    // ...
  ]
});

Apply a Filter Programmatically

To apply a cross-filter in code, call the setFilter method on the Dashboard instance. Pass the dashboard item name and the target value:

import { Dashboard } from "survey-analytics";

const dashboard = new Dashboard({
  /* Dashboard configuration */
});

dashboard.setFilter("question1", "item1");

Other Interactive UI Features

Send feedback to the SurveyJS team

Need help? Visit our support page

Your cookie settings

We use cookies to make your browsing experience more convenient and personal. Some cookies are essential, while others help us analyse traffic. Your personal data and cookies may be used for ad personalization. By clicking “Accept All”, you consent to the use of all cookies as described in our Terms of Use and Privacy Statement. You can manage your preferences in “Cookie settings.”

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.