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

# SlotsPainted

## Definition

Indicates the number of index slots in which bars are painted within the chart canvas area. This covers the visible portion of the chart only, and does not include historical painted bars outside of the visible area.

## Property Value

An int representing the number of index slots in which bars are painted.

## Syntax

`\<chartcontrol\>.SlotsPainted`

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
   int painted = chartControl.SlotsPainted;
 
   // Print the number of bars painted on the visible chart canvas
   Print(painted);
}
```

In the image below, **SlotsPainted** reveals that there are 17 bars painted on the chart canvas.

![ChartControl\_SlotsPainted](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/c1e988b1618d2c75d5b87361f7dcf28d4f32fdd8378ccac576ab7aeb9a376cce/docs/assets/developer/desktop-sdk/references/slotspainted-chartcontrol-slotspainted.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260729%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260729T062233Z&X-Amz-Expires=604800&X-Amz-Signature=32f02b1e2974470fb1ac51917a7d62d11fa9d4707c5660d304a1bec69a02cb8b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)