> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# BarWidthUI

## Definition

The Bar width value which displays on the UI. This value will be rounded from the internal **BarWidth** property which is updated as the ChartControl is resized.

## Property Value

An **int** value representing the width of the chart bars which can be set by a user.

## Syntax

`BarWidthUI`

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale, ChartBars chartBars)
{
     int barWidth = GetBarPaintWidth(BarWidthUI);
}
```