Spread Silverlight Documentation
Title Property (Axis)
Example 


Gets or sets the axis title.
Syntax
'Declaration
 
Public Property Title As ChartTitle
'Usage
 
Dim instance As Axis
Dim value As ChartTitle
 
instance.Title = value
 
value = instance.Title
public ChartTitle Title {get; set;}
Example
This example sets an axis title.
GrapeCity.Windows.SpreadSheet.Data.ChartTitle clabel = new GrapeCity.Windows.SpreadSheet.Data.ChartTitle();
clabel.Text = "Axis";

GrapeCity.Windows.SpreadSheet.Data.SpreadOpenHighLowCloseSeries ds = new GrapeCity.Windows.SpreadSheet.Data.SpreadOpenHighLowCloseSeries();
ds.StrokeThickness = 3;
ds.XValues.AddRange(new double[] { 
new DateTime(2008,10,1).ToOADate(), new DateTime(2008,10,2).ToOADate(), new DateTime(2008,10,3).ToOADate(),
new DateTime(2008,10,6).ToOADate(), new DateTime(2008,10,7).ToOADate(), new DateTime(2008,10,8).ToOADate()
          });
ds.OpenSeries.Values.AddRange(new double[] { 100, 102, 104, 100, 107, 102 });
ds.CloseSeries.Values.AddRange(new double[] { 102, 104, 100, 107, 102, 100 });
ds.HighSeries.Values.AddRange(new double[] { 102, 105, 105, 108, 109, 105 });
ds.LowSeries.Values.AddRange(new double[] { 99, 95, 95, 100, 96, 99, 98 });
GrapeCity.Windows.SpreadSheet.Data.SpreadChart chart = new GrapeCity.Windows.SpreadSheet.Data.SpreadChart();
chart.DataSeries.Add(ds);
chart.ChartType = GrapeCity.Windows.SpreadSheet.Data.SpreadChartType.StockHighLowOpenClose;
chart.Name = "name1";
chart.AxisX.AxisType = GrapeCity.Windows.SpreadSheet.Data.AxisType.Date;
chart.AxisX.BaseTimeUnit = GrapeCity.Windows.SpreadSheet.Data.AxisTimeUnit.Days;
chart.AxisX.Title = clabel;
this.gcSpreadSheet1.ActiveSheet.Charts.Add(chart);
Dim clabel As New GrapeCity.Windows.SpreadSheet.Data.ChartTitle()
clabel.Text = "Chart Label"

Dim ds As New GrapeCity.Windows.SpreadSheet.Data.SpreadOpenHighLowCloseSeries()
ds.StrokeThickness = 3
ds.XValues.AddRange(New Double() {
New DateTime(2008, 10, 1).ToOADate(), New DateTime(2008, 10, 2).ToOADate(), New DateTime(2008, 10, 3).ToOADate(),
New DateTime(2008, 10, 6).ToOADate(), New DateTime(2008, 10, 7).ToOADate(), New DateTime(2008, 10, 8).ToOADate()
      })
ds.OpenSeries.Values.AddRange(New Double() {100, 102, 104, 100, 107, 102})
ds.CloseSeries.Values.AddRange(New Double() {102, 104, 100, 107, 102, 100})
ds.HighSeries.Values.AddRange(New Double() {102, 105, 105, 108, 109, 105})
ds.LowSeries.Values.AddRange(New Double() {99, 95, 95, 100, 96, 99, 98})
Dim chart As New GrapeCity.Windows.SpreadSheet.Data.SpreadChart()
chart.DataSeries.Add(ds)
chart.ChartType = GrapeCity.Windows.SpreadSheet.Data.SpreadChartType.StockHighLowOpenClose
chart.Name = "name1"
chart.AxisX.AxisType = GrapeCity.Windows.SpreadSheet.Data.AxisType.Date
chart.AxisX.BaseTimeUnit = GrapeCity.Windows.SpreadSheet.Data.AxisTimeUnit.Days
chart.AxisX.Title = clabel
GcSpreadSheet1.ActiveSheet.Charts.Add(chart)
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

Axis Class
Axis Members

 

 


Copyright © GrapeCity, inc. All rights reserved.