A bar chart consists of several vertical bars, one for each data point entered. The height of each bar depends on the value of that data point, as shown in the example image below. Negative values are allowed.
Data points can be entered with the ADD or ADDXY function.
When data points are entered using the ADD function, only the Y value needs to be specified. The first data point added to a series receives the X value specified in the StartOnXAxis property for that series. Each subsequent data point increases the X value by the value specified in the StepSize property.
When data points are entered using the ADDXY function, both the X and Y values of each data point must be specified. Data points can be entered in any order.
Note: ADD and ADDXY cannot be mixed.
A bar chart can display multiple data sets, up to a total of 12. In LION, these are called series[1] through series[12]. Only series with nonzero data values are displayed. You can enter data to display by using one of the following commands:
<BarChartObject>.series[<NN>].add (<Yvalue>[, <Label>])
or<BarChartObject>.series[<NN>].addxy (<Xvalue>, <Yvalue>[, <Label>])
Where:
For more information about chart coding, see Series Coding. The total interval displayed in the chart can be set by using the MinValueX, MaxValueX, MinValueY, and MaxValueY properties. When set to zero, the interval displayed is set automatically to show all data points. The distance between the gridlines in the chart can be set by using the StepSizeX and StepSizeY properties. When set to zero, the interval is chosen automatically.
When the Set_X_Axis_To_Zero property is set to True, the Y-axis is displayed at the zero value of the X-axis instead of at the left side of the chart. The default is False. When the Set_Y_Axis_To_Zero property is set to True, the X-axis is displayed at the zero value of the Y-axis instead of at the bottom of the chart. The default is False.
Individual series can be cleared with the <BarChartObject>.series[<NN>].clear() command.
The chart shown above was created with the following code:
loop for i := 1 to 4
rev := 10 * i ** 2
chart_bar.series[1].add (rev)
rev := 200 - rev
chart_bar.series[2].add (rev)
rev := 50 * (i - 2) ** 2
chart_bar.series[3].add (rev)
endloopStatic properties:
Dynamic properties:
Legacy Properties (unsupported):