# values

Values for a single series. Use the data type required by the selected chart, such as a number array for Line or coordinate array for Scatter. Assign arrays and objects as JavaScript properties.

Canonical: https://chart.syidax.com/docs/options/values/

<a id="definition"></a>

## Definition

| Item | Value |
| --- | --- |
| JavaScript property | `values` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `LineChartValues \| ScatterChartValues` |
| Default | `new Float32Array(0)` |

- [LineChartValues](https://chart.syidax.com/docs/types/LineChartValues.md) — Type definition
- [ScatterChartValues](https://chart.syidax.com/docs/types/ScatterChartValues.md) — Type definition

<a id="example"></a>

## Configuration example

```javascript
// Register sy-pie-chart and create the element before configuring it.
chart.values = [
  {
    "name": "Product A",
    "value": 42,
    "color": "#8263d9"
  },
  {
    "name": "Product B",
    "value": 28,
    "color": "#239c91"
  },
  {
    "name": "Product C",
    "value": 18,
    "color": "#e99954"
  },
  {
    "name": "Other",
    "value": 12,
    "color": "#d76c8f"
  }
];
```

- [Pie · Complete examples and API](https://chart.syidax.com/docs/components/pie.md)

<a id="related"></a>

## Related documentation

A property with the same name may have different types and defaults across charts. When using a direct tag, follow that chart's documentation below.

- [Shared facade and direct tags](https://chart.syidax.com/docs/concepts.md)
- [sy-line-chart](https://chart.syidax.com/docs/components/line.md#property-values)
- [sy-area-chart](https://chart.syidax.com/docs/components/area.md#property-values)
- [sy-column-chart](https://chart.syidax.com/docs/components/column.md#property-values)
- [sy-bar-chart](https://chart.syidax.com/docs/components/bar.md#property-values)
- [sy-pie-chart](https://chart.syidax.com/docs/components/pie.md#property-values)
- [sy-scatter-chart](https://chart.syidax.com/docs/components/scatter.md#property-values)
- [sy-lollipop-chart](https://chart.syidax.com/docs/components/lollipop.md#property-values)
- [sy-variwide-chart](https://chart.syidax.com/docs/components/variwide.md#property-values)
- [sy-pareto-chart](https://chart.syidax.com/docs/components/pareto.md#property-values)
- [sy-histogram-chart](https://chart.syidax.com/docs/components/histogram.md#property-values)
- [sy-stem-leaf-chart](https://chart.syidax.com/docs/components/stem-leaf.md#property-values)
- [sy-pictorial-chart](https://chart.syidax.com/docs/components/pictorial.md#property-values)
- [sy-item-chart](https://chart.syidax.com/docs/components/item.md#property-values)
- [sy-word-cloud](https://chart.syidax.com/docs/components/word-cloud.md#property-values)
- [sy-wafer-map](https://chart.syidax.com/docs/components/wafer-map.md#property-values)
- [sy-yield-zone-chart](https://chart.syidax.com/docs/components/yield-zone-chart.md#property-values)
