# applyChartCrossFilter

Applies chart selection actions to the Grid filter model.

Canonical: https://grid.syidax.com/docs/methods/applyChartCrossFilter/

<a id="meaning"></a>

## What does this API do?

Applies chart selection actions to the Grid filter model.

API for Pro features: Integrated range charts and pivot chart tools

<a id="contract"></a>

## Exact input and result types

```typescript
applyChartCrossFilter(chartId: string, colId: string, action: SyGridChartCrossFilterAction, categories: unknown[]): Promise<SyGridChartCrossFilterResult>
```

| Arguments | Required | Type |
| --- | --- | --- |
| chartId | Required | string |
| colId | Required | string |
| action | Required | SyGridChartCrossFilterAction |
| categories | Required | unknown[] |

The return type is `Promise<SyGridChartCrossFilterResult>`.

<a id="usage"></a>

## Usage flow

After registering and initializing the Grid element, call grid.applyChartCrossFilter(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

<a id="types"></a>

## Read related types

- [SyGridChartCrossFilterAction](https://grid.syidax.com/docs/types/SyGridChartCrossFilterAction.md)
- [SyGridChartCrossFilterResult](https://grid.syidax.com/docs/types/SyGridChartCrossFilterResult.md)

<a id="recipes"></a>

## Feature explanations and examples

- [Chart selected data](https://grid.syidax.com/docs/features/integrated-charts.md) — Connect a Grid range to a chart to view the same data as both a table and a graph. Select category and value columns appropriate to the chart type, rather than simply selecting numeric values.
