> 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.

# Bars

## Definition

Represents the data returned from the historical data repository in relation to the primary **ChartBars** object configured on the chart. See also [Bars](/developer/desktop-sdk/references/common/bars).

## Property Value

A **Bars** object

## Syntax

`ChartBars.Bars`

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
   if(ChartBars != null && ChartBars.Bars != null)
   {
     Print("The configured bars period type represented on the chart is" + ChartBars.Bars.BarsPeriod.BarsPeriodType);
   }
}
```