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

# W (Width)

## Definition

Indicates the width (in pixels) of the paintable area of the chart panel.

The paintable area does not extend all the way to the right edge of the panel itself, as seen in the image below.

## Property Value

A **int** representing the width of the panel in pixels

## Syntax

`ChartPanel.W`

## Example

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)  
{  
  base.OnRender(chartControl, chartScale);  
     
  // Print the width of the panel  
  Print(ChartPanel.W);  
}
```

Based on the image below, W reveals that the chart panel is 451 pixels wide.

![ChartPanel\_W](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/cc4544caf75a1716a0ca70b314a685abba955a9ebbe60dfadf2a480fc16a081c/docs/assets/developer/desktop-sdk/shared/chartpanel-w.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=20260729T070623Z&X-Amz-Expires=604800&X-Amz-Signature=b141f769c77b3faba1e4ae713bae4397b0ceef79ad9894e0f6aa99ef37960d69&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)