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

# ChartPanels

## Definition

Holds a collection of **ChartPanel** objects containing information about the panels active on the chart.

## Property Value

An **ObservableCollection** of **ChartPanel** objects

## Syntax

`\<chartcontrol\>.ChartPanels`

## Examples

Based on the image below, there are three ChartPanel objects in the ChartPanels collection, as seen by **ChartPanels.Count** in the code above.

![ChartControl\_ChartPanels](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/5b6f17abe456f988b9d7254881eb784bb4654834040c98affffc4cb983f88c8a/docs/assets/developer/desktop-sdk/references/chartpanels-chartcontrol-chartpanels.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=20260729T062141Z&X-Amz-Expires=604800&X-Amz-Signature=1466390364b61b3af70e07a6a22bfbf7ed74a8896bda9e553a58ce0b56617cf7&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
   // Print the number of panels currently displayed on the chart
   Print(String.Format("There are {0} panels on the chart", chartControl.ChartPanels.Count));  
}
```