Super 2d/3d Graph Library

Enhance your .NET application adding nice charts within minutes! Save time and money!


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:

  • Caption -- label for the indicator
  • CaptionBackColor -- background color for the label
  • CaptionColor -- text color for the label
  • CaptionFont -- font for the label
  • CaptionStyle -- backstyle of the label (opaque rounded square or transparent)
  • Value -- position in the Y axis (a valid numeric value in the Y axis range)
  • LineStyle -- a pen object specifying the line style (width, color, style...)


    Steps to run this sample:

    1. Create a new Windows application project (VB.NET)

    2. Add Super 2d/3d Graph Library to the toolbox pallete and drag a chart to Form1.

    3. Copy and paste de following code:


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:


 

 

License & Purchase Info


Current version: 14

Super 2d/3d Graph Library is available as:
-Standard License (99€)
-Premium License (149€)
-Enterprise License (299€)

Click here for more details & purchase

Contact Info


Feel free to contact us
for questions related to any of our products or custom .Net development. We usually respond in the same labor day.

Software Siglo XXI

Main support service: support@softwaresigloxxi.com

Sales and other enquiries: contact@softwaresigloxxi.com