BarsArray

<< Click to Display Table of Contents >>

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

BarsArray

Previous page Return to chapter overview Next page

Definition

Provides a collection of ChartBars objects currently configured on the chart.

 

Property Value

An ObservableCollection of ChartBars objects

 

Syntax

<ChartControl>.BarsArray

 

Examples

ns

protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
  // Instantiate a new <ChartControl>.BarsArray collection
  System.Collections.ObjectModel.ObservableCollection<ChartBars> myChartBars = chartControl.BarsArray;
 
  // Print the number of bars in each Bars object within the <ChartControl>.BarsArray collection
  foreach(ChartBars bars in myChartBars)
  {
      Print(bars.Bars.Count);
  }
}