Example 17: Labels - SeriesLegend vs ItemsLegend
This is a quick
SeriesLegend and ItemsLegend properties
sample:
Take a look at the
following sample:
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:
Note: the code in the
Form1_Load event could be used in ASP.NET
applications as well.
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 myData(2) As ArrayList
' Some quick random data...
myData(0) = New ArrayList
myData(0).Add(15)
myData(0).Add(17)
myData(0).Add(24)
myData(1) = New ArrayList
myData(1).Add(5)
myData(1).Add(23)
myData(1).Add(28)
myData(2) = New ArrayList
myData(2).Add(12)
myData(2).Add(18)
myData(2).Add(19)
With Super2D3dGraph1
.LicenseeIdentifier = "PROF"
' General appearance
.Title = "PETS SOLD!"
.Series = myData
.ShowDataTable = False
.Style =
STYLE2D3D.STYLE2D_ACUM_FIXED
.WallsBackStyle =
STYLEWALLBACKGROUND.STYLEWALLBACKGROUND_TRANSPARENT
.BackStyle =
STYLEBACKGROUND.STYLEBACKGROUND_GRADIENT_TUBULAR_INVERTED
' Yaxis look & feel
.YAxisTitle = "Units"
.YAxisDividersCount
= 5
.YAxisNumericFormat = "0" '
<- No decimals
' Values look & feel
.ValuesFormat = "0" '
<- No decimals
.ValuesBackColor =
Color.LightSkyBlue
' Legend look & feel
.Thickness = 90
.SeriesLegend = New String()
{"Cats", "Dogs", "Birds"}
.SeriesColor = New Color()
{Color.Yellow,
Color.Brown, Color.Cyan}
.LegendAlignment
= STYLEALIGNMENT.STYLEALIGNMENT_TOP_CENTER
.LegendText = "" ' <-
Hide legend title
.ShowLegend = True
' X-Axis look & feel
.ItemsLegend = New String()
{"October
2006", "November
2006", "December
2006"}
.ShowItemsLegend = True
.XAxisTitle = "Month"
.ShowXAxis = True
.RefreshChart()
End With
End Sub
End Class
Result:

|