# barStyle

Candlestick / OHLC (): the bar style — `candle` / `ohlc` / `hlc` on a candlestick, `ohlc` / `hlc` on `type="ohlc"`.

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

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

## Definition

| Item | Value |
| --- | --- |
| JavaScript property | `barStyle` |
| HTML attribute | `bar-style` |
| Type | `string` |
| Default | `undefined` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

## Configuration example

```javascript
// Register sy-ohlc-chart and create the element before configuring it.
chart.barStyle = "ohlc";
```

- [Ohlc · Complete examples and API](https://chart.syidax.com/docs/components/ohlc.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-candlestick-chart](https://chart.syidax.com/docs/components/candlestick.md#property-barStyle)
- [sy-ohlc-chart](https://chart.syidax.com/docs/components/ohlc.md#property-barStyle)
