BarWidth

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Common > Charts > ChartControl >

BarWidth

Previous page Return to chapter overview Next page

Definition

Measures the value of the bar width set for the primary Bars object on the chart.

 

Note: This property value is not stated in pixels. To obtain the pixel-width of bars on the chart, use GetBarPaintWidth() instead.

 

 

Property Value

A double representing the value of the bar width.

 

Syntax

<ChartControl>.BarWidth

 

Examples

ns

protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
  double barWidth = chartControl.BarWidth;
 
  // Prints the width of bars on the chart
  Print(barWidth);
}

 

 

Based on the image below, BarWidth reveals that the bars on the chart are 4.02 pixels wide.

 

ChartControl_BarWidth