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

# Width

## Definition

Indicates the overall distance (from left to right) of the chart scale.

Width does not return its value in terms of device pixels. However, using Width.ConvertToVerticalPixels or Width.ConvertToHorizontalPixels will convert the Width value to device pixels. Alternatively, RenderTarget.PixelSize.Width or ChartPanel.W will also provide the width in terms of device pixels.

## Property Value

A double value representing the width of the chart scale.

## Syntax

`\<chartScale\>.Width`

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)  
{  
  // the width of the entire chart scale  
  double   width       = chartScale.Width;  
  Print("the width of the chart scale is: " + Width);    
}
```

In the image below, the entire of width of the chart scale is represented by the blue line which is calculated at 450 pixels.

![Width](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/162716124044705cd9b9df8a710fac6dfe4b893d3a58827e7b01ab10394efb03/docs/assets/developer/desktop-sdk/references/width-width.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=20260729T070234Z&X-Amz-Expires=604800&X-Amz-Signature=f79089e1f7575df88489258b96b09285275571e8999c7e7e71e361278b89b3b9&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)