Example 27: Y-Axis-Indicators
Y-Axis-Indicators allows
you to add horizontal custom lines to the
chart, like limits, targets, ...
You may add any number of
YAxisIndicators. First you define an array
of YAxisIndicators (one element per line),
customize each line and finally add the
array to the YAxisIndicators property of the
chart control. The following properties may
be configured for each indicator or line:
Form Code
Imports Super2d3dGraphLibrary
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
With Super2d3dGraph1
.LicenseeIdentifier = "STAND"
.SampleChart()
.Title = "Y-Axis-Indicators Demo"
.Style =
STYLE2D3D.STYLE2D_BAR
.YAxisScaleMaximum
= 200
.YAxisScaleMinimum
= 0
.YAxisScaleMode =
SCALEMODE.SCALEMODE_FIXED
Dim YAxisIndicators(1) As YAXIS_INDICATORS
' Look&feel for indicator #1
YAxisIndicators(0) = New YAXIS_INDICATORS
With YAxisIndicators(0)
.Caption = "Lower Limit"
.CaptionBackColor =
Color.Yellow
.CaptionColor = Color.Blue
.CaptionFont = New Font("Arial",
8)
.CaptionStyle =
STYLECAPTION.STYLECAPTION_ROUNDED_SQUARE
.LineStyle = New Pen(Color.Blue, 2)
.Value = 55
End With
' Look&feel for indicator #2 (use default
values)
YAxisIndicators(1) = New YAXIS_INDICATORS
With YAxisIndicators(1)
.Caption = "Upper Limit"
.Value = 150
End With
' Assign array of indicators to
YAxisIndicators property
.YAxisIndicators =
YAxisIndicators
.RefreshChart()
End With
End Sub
End Class
Result:

|