Super 2d/3d Graph Library

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


Example 9: Changing look & feel of axis

 

This example shows available properties for setting the look & feel for both axis.

Steps:

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

2. Add Super 2d/3d Graph Library to the toolbox pallete and drag it 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

      Dim v As New Super2d3dGraphLibrary.SeriesFactory
     
Dim x As Single

      ' Precalculate some random values
      For k As Integer = 0 To 15
         x = x + Int(Rnd() * 10) + 15
         v.AddValue(x)
      Next

      ' Populate the chart
      With Super2D3dGraph1
         .AutoRefresh = False
        
.LicenseeIdentifier = "STAND" ' This is the demo license
         .Title = "Setting look & feel of axis"
         .Style = STYLE2D3D.STYLE2D_BAR
         .ValuesLocationStyle = STYLECAPTIONLOCATION.STYLECAPTIONLOCATION_INSIDE
        
.ShowDataTable =
False

         ' begin Y-axis properties ---------------------------------------------
        
         .YAxisDividersCount = 10 ' # of lines; 0 = hide lines
         .YAxisColor = Color.Blue ' Text color
         ' ... title's text and font:
         .YAxisTitle = "Y-axis"
         .YAxisTitleFont = New Font("Arial", 12, FontStyle.Bold, GraphicsUnit.Point)
         ' ... properties for y axis labels:
         .YAxisValuesFont = New Font("Arial", 10, FontStyle.Regular, GraphicsUnit.Point)
         .YAxisLabelsRotated = True ' Rotate 45º labels
         .YAxisLocation = STYLEYAXISLOCATION.STYLEYAXISLOCATION_LEFT ' Left or right
         .YAxisNumericFormat = "0" ' Numeric format ("0", "N", ...
                                    See VS help for numeric formats)
         .YAxisScaleMode = SCALEMODE.SCALEMODE_AUTOMATIC ' Mode for y range calculus
         .YAxisScaleMaximum = 200 ' Max. Y range (doesn't apply; it's set to AUTOMATIC)
         .YAxisScaleMinimum = -200 ' ... just for demonstration purposes
        
         ' end Y-axis properties ---------------------------------------------

         ' begin X-axis properties -------------------------------------------

         .ShowXAxis = True ' Show x-axis labels
         .XAxisColor = Color.Red ' Text color
         .XAxisDividersCount = 0 ' 0 = automatic based upon number of items for any serie
         ' ... title's text and font
         .XAxisTitle = "X-axis"
         .XAxisTitleFont = New Font("Tahoma", 12, FontStyle.Bold, GraphicsUnit.Point)
         ' ... properties for x axis labels:
         .XAxisValuesFont = New Font("Tahoma", 10, FontStyle.Regular, GraphicsUnit.Point)
         .XAxisLabelsRotated90 = False ' Rotate 90º; can be 45 or 90
         .XAxisLabelsRotated = True ' Rotate 45º labels
         .XAxisNumericFormat = "0" ' Numeric format ("0", "N", ...
                                    See VS help for numeric formats)
         .XAxisScaleMode = SCALEMODE.SCALEMODE_FIXED ' Mode for x range calculus
         .XAxisScaleMaximum = 200 ' Setting a scale only works for scatter
                                    and bubble chart types
         .XAxisScaleMinimum = 0

        
' end X-axis properties -------------------------------------------

      End With

      ' Assign the previous calculated values to the chart
      v.ApplyTo(Super2D3dGraph1)

      ' Show me the chart!
      Super2D3dGraph1.RefreshChart()

   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