# Chart Data

<flow-chart-data>
Stable

The chart data component is used with the char component to specify a dataset to display.

See Chart for examples of using the chart data component.

The chart data component is used to bind data to a chart. The name attribute should be set to the named data placeholder within the Vega/VegaLite chart spec (typically, 'data').

The data attribute should be set to a Flo.w reactive expression returning an array of data objects. To display the results of a Flo.w reactive query, bind the data to the results property of the reactive query. For example:

...
<flow-chart-data name="data" data="$queries.myQuery.results"></flow-chart-data>
...

If specified, x and y will be set as Vega signals and can be used to create generic chart specs.