BarWidth

View as Markdown

Definition

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

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

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

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

ChartControl_BarWidth