Spread Silverlight Documentation
GetDataMarker Method
Example 


Index of the point.
Gets the data marker.
Syntax
'Declaration
 
Public Function GetDataMarker( _
   ByVal pointIndex As System.Integer _
) As DataMarker
'Usage
 
Dim instance As SpreadDataSeries
Dim pointIndex As System.Integer
Dim value As DataMarker
 
value = instance.GetDataMarker(pointIndex)
public DataMarker GetDataMarker( 
   System.int pointIndex
)

Parameters

pointIndex
Index of the point.
Example
This example uses the GetDataMarker method.
//only for line charts.
GrapeCity.Windows.SpreadSheet.Data.SpreadChart chart = new GrapeCity.Windows.SpreadSheet.Data.SpreadChart("Chart", GrapeCity.Windows.SpreadSheet.Data.SpreadChartType.Line, 0, 0, 200, 200);

GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries ds = new GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries();
ds.Values.Add(4);
ds.Values.Add(7);
ds.Values.Add(6);
ds.Values.Add(10);
ds.Values.Add(4);
//dataSeries level
ds.MarkerSize = new Size(15, 15);
ds.MarkerType = GrapeCity.Windows.SpreadSheet.Data.MarkerType.Diamond;
ds.DataMarkerStyle.Fill = new SolidColorBrush(Colors.Green);
ds.DataMarkerStyle.Stroke = new SolidColorBrush(Colors.Blue);
ds.DataMarkerStyle.StrokeDashType = GrapeCity.Windows.SpreadSheet.Data.StrokeDashType.Dash;
ds.DataMarkerStyle.StrokeThickness = 2;
//data marker level
ds.GetDataMarker(2).Fill = new SolidColorBrush(Colors.Orange);
ds.GetDataMarker(2).Stroke = new SolidColorBrush(Colors.Yellow);
ds.GetDataMarker(2).StrokeDashType = GrapeCity.Windows.SpreadSheet.Data.StrokeDashType.Dash;
ds.GetDataMarker(2).StrokeThickness = 4;
ds.GetDataMarker(2).MarkerSize = new Size(20, 20);
chart.ChartType = GrapeCity.Windows.SpreadSheet.Data.SpreadChartType.Scatter;
chart.DataSeries.Add(ds); 
gcSpreadSheet1.ActiveSheet.Charts.Add(chart);
Dim chart As New GrapeCity.Windows.SpreadSheet.Data.SpreadChart("Chart", GrapeCity.Windows.SpreadSheet.Data.SpreadChartType.Line, 0, 0, 200, 200)

Dim ds As New GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries()
ds.Values.Add(4)
ds.Values.Add(7)
ds.Values.Add(6)
ds.Values.Add(10)
ds.Values.Add(4)
'dataSeries level
ds.MarkerSize = New Size(15, 15)
ds.MarkerType = GrapeCity.Windows.SpreadSheet.Data.MarkerType.Diamond
ds.DataMarkerStyle.Fill = New SolidColorBrush(Colors.Green)
ds.DataMarkerStyle.Stroke = New SolidColorBrush(Colors.Blue)
ds.DataMarkerStyle.StrokeDashType = GrapeCity.Windows.SpreadSheet.Data.StrokeDashType.Dash
ds.DataMarkerStyle.StrokeThickness = 2
'data marker level
ds.GetDataMarker(2).Fill = New SolidColorBrush(Colors.Orange)
ds.GetDataMarker(2).Stroke = New SolidColorBrush(Colors.Yellow)
ds.GetDataMarker(2).StrokeDashType = GrapeCity.Windows.SpreadSheet.Data.StrokeDashType.Dash
ds.GetDataMarker(2).StrokeThickness = 4
ds.GetDataMarker(2).MarkerSize = New Size(20, 20)
chart.ChartType = GrapeCity.Windows.SpreadSheet.Data.SpreadChartType.Scatter
chart.DataSeries.Add(ds)
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

SpreadDataSeries Class
SpreadDataSeries Members

 

 


Copyright © GrapeCity, inc. All rights reserved.