Filtering the Data

Use a filter component to drive a chart by binding a parameter in the chart’s connection Condition and reloading that connection from the filter’s Script on load.

Steps

  1. On the Designer Canvas page

    • Drag a chart together with a filter component to the canvas.

  2. Create two data connections

    • One connection for the chart.

    • One connection for the filter.

  3. Associate connections

    • Bind the chart to ConnectionID_1 (the chart connection).

    • Bind the filter to the second connection.

  4. Add a filter parameter to the chart connection condition

    • Open Data Connectors → ConnectionID_1 → Condition.

    • Enable the condition (checkbox) and add your filter parameter.

      • If your environment uses standard syntax, reference fields and variables like:

        • [field_name] = {yourFilterVariable}

  5. Navigate to the Script on the load page of the filter component

    • Add the following line to reload the chart’s connection when the filter is (re)applied:

    sdk.reload( [ 'ConnectionID_1' ] );
  6. Preview

    • Click Preview to validate that changing the filter updates the chart.

Note: The ConnectionID_1 should be the chart connection.

Tips:

  • Ensure the Condition on ConnectionID_1 is enabled and correctly references the filter’s parameter/variable.

  • If you want the chart to refresh on user interaction (not just on load), also place the same sdk.reload( [ 'ConnectionID_1' ] ); inside the filter’s change event handler (if available in your component’s scripting options).

  • Keep component and connection names consistent so they’re easy to reference in scripts and conditions.

Troubleshooting

  • Chart doesn’t update: Verify the condition is enabled, the parameter/variable is set, and you’re reloading the correct ConnectionID_1.

  • No data after filtering: Check the condition expression (field/variable names) and try removing the filter to confirm baseline data loads.

  • Script not firing: Make sure the code is on the filter’s Script on load (and on change, if used), then re-open Preview.