LastSlotPainted

<< Click to Display Table of Contents >>

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

LastSlotPainted

Previous page Return to chapter overview Next page

Definition

Indicates the most recent (last) slot index of the Data Series on the chart, regardless if a bar is actually painted in that slot.

 

Note: LastSlotPainted differs from ChartBars.ToIndex, which returns the last index containing a bar painted in the visible area of the chart.

 

Property Value

A int representing the most recent (last) slot index on the chart

 

Syntax

<ChartControl>.LastSlotPainted

 

Example

ns

protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
  int lastSlot = chartControl.LastSlotPainted;
 
  // Print the index of the last slot on the chart
  Print(lastSlot);
}