Super 2d/3d Graph Library

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


Example 8: Fixed numeric scale on both axis

 

By default, Super 2d/3d Graph Library automatically calculates the minimum and maximum values for both axis and then displays the values according to that range.

For scatter and bubble chart types, since the values are X/Y pairs, you may specify a fixed numeric scale for both Y and X axis, instead of the automatic mode.

For other chart types you may also specify a fixed numeric scale for Y-axis but not for X-axis (for X-axis you may use for any chart type DATETIME_AUTOMATIC, DATETIME_FIXED or AUTOMATIC).

In this example, 500 random points are calculated from (0..500, 0..500) space. The example uses fixed scale for both axis, X and Y, with a range of 0..1000, 0..1000. Because of this, points are drawn in the lower-left quadrant.

Using XAxisDividersCount and YAxisDividersCount properties, you may also specify the number of items in the X or Y 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 Object, ByVal e As System.EventArgs) Handles Me.Load

      Dim v As New Super2d3dGraphLibrary.SeriesFactory
      Dim x, y As Single

      ' Precalculate some random values
      x = 100

      For k As Integer = 0 To 500
         x = Rnd() * 500
         y = Rnd() * 500
         v.AddPoint(x, y)
      Next

      ' Populate the chart

      With Super2D3dGraph1
         .AutoRefresh = False
     .LicenseeIdentifier = "STAND" ' This is the demo license
         .Title = "Working with fixed scales on X-axis"
         .Style = STYLE2D3D.STYLE2D_XY

         ' Fixed scale on y-axis
         .YAxisScaleMode = SCALEMODE.SCALEMODE_FIXED
         .YAxisScaleMinimum = 0
         .YAxisScaleMaximum = 1000
         .YAxisDividersCount = 8

         ' Fixed scale on x-axis
         .XAxisScaleMode = SCALEMODE.SCALEMODE_FIXED
         .XAxisScaleMinimum = 0
         .XAxisScaleMaximum = 1000
         .XAxisDividersCount = 5

         ' Minor fancy adjustements
         .XAxisLabelsRotated = True
         .ShowXAxis = True
         .ShowLegend = False
         .ShowDataTable = False
         .ShowValues = False

   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