ZOrder

View as Markdown

Definition

A unique identifier representing the index in which chart objects are drawn on the chart’s Z-axis (front to back ordering). Objects with a higher ZOrder are drawn first.

The ZOrder index should NOT be set using this property. Please use the dedicated SetZOrder() method for this purpose.

Property Value

A int value representing the order that the object is drawn. Default value is categorized by the type of object drawn, which will then increment for each instance of the chart object that is drawn. Each type of object will have a different default starting value to keep these objects separate:

Chart Bars1
NinjaScript Objects10001
Global Draw Objects20001
Draw Objects30001

Syntax

ZOrder

Examples

1protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
2{
3 // call the base.OnRender() to ensure standard Plots work as designed
4 base.OnRender(chartControl, chartScale);
5
6 // Print the currently assigned ZOrder index for this NinjaScript object
7 Print("Current ZOrder level is: " + ZOrder);
8}