Spread Silverlight Documentation
Horizontal and Vertical Axes
Spread Silverlight Documentation > Developer's Guide > Customizing the Appearance > Creating Sparklines > Horizontal and Vertical Axes

You can display the horizontal axis with the DisplayXAxis property.

You can specify different minimum and maximum value options for the vertical axis with the SparklineAxisMinMax enumeration.

Using Code

The following example specifies minimum and maximum values for the axis with the ManualMin and ManualMax properties.

CS
Copy Code
GrapeCity.Windows.SpreadSheet.Data.CellRange cellr = new GrapeCity.Windows.SpreadSheet.Data.CellRange(1, 0, 1, 3);
GrapeCity.Windows.SpreadSheet.Data.SparklineSetting ex = new GrapeCity.Windows.SpreadSheet.Data.SparklineSetting();
ex.MaxAxisType = GrapeCity.Windows.SpreadSheet.Data.SparklineAxisMinMax.Custom;
ex.ManualMax = 12;
ex.MinAxisType = GrapeCity.Windows.SpreadSheet.Data.SparklineAxisMinMax.Custom;
ex.ManualMin = 0;
gcSpreadSheet1.Sheets[0].Cells[1, 0].Value = 5;
gcSpreadSheet1.Sheets[0].Cells[1, 1].Value = 17;
gcSpreadSheet1.Sheets[0].Cells[1, 2].Value = 4;
gcSpreadSheet1.Sheets[0].SetSparkline(1, 3, cellr, GrapeCity.Windows.SpreadSheet.Data.DataOrientation.Horizontal);
gcSpreadSheet1.Invalidate();
VB.NET
Copy Code
Dim cellr As New GrapeCity.Windows.SpreadSheet.Data.CellRange(1, 0, 1, 3)
Dim ex As New GrapeCity.Windows.SpreadSheet.Data.SparklineSetting()
ex.MaxAxisType = GrapeCity.Windows.SpreadSheet.Data.SparklineAxisMinMax.Custom
ex.ManualMax = 12
ex.MinAxisType = GrapeCity.Windows.SpreadSheet.Data.SparklineAxisMinMax.Custom
ex.ManualMin = 0
GcSpreadSheet1.Sheets(0).Cells(1, 0).Value = 5
GcSpreadSheet1.Sheets(0).Cells(1, 1).Value = 17
GcSpreadSheet1.Sheets(0).Cells(1, 2).Value = 4
GcSpreadSheet1.Sheets(0).SetSparkline(1, 3, cellr, GrapeCity.Windows.SpreadSheet.Data.DataOrientation.Horizontal)
GcSpreadSheet1.Invalidate()
See Also