Class StackingLineSeries
To render a stacked line chart, create an instance of the StackingLineSeries class, and add it to Series collection property and set the required properties.
Inheritance
System.Object
StackingLineSeries
Inherited Members
Namespace: Syncfusion.SfChart.XForms
Assembly: Syncfusion.SfChart.XForms.dll
Syntax
public class StackingLineSeries : StackingSeriesBase, IThemeElement
Remarks
StackingLineSeries requires ItemsSource, XBindingPath and YBindingPath properties to be set to render the chart. This series also requires x-axis and y-axis to be explicitly set either using PrimaryAxis and SecondaryAxis or XAxis and YAxis.
Examples
SfChart chart = new SfChart();
chart.PrimaryAxis = new CategoryAxis();
chart.SecondaryAxis = new NumericalAxis();
StackingLineSeries series = new StackingLineSeries();
ObservableCollection<ChartDataPoint> Data = new ObservableCollection<ChartDataPoint>
{
new ChartDataPoint("2006",28),
new ChartDataPoint("2007",68),
new ChartDataPoint("2008",38)
};
series.ItemsSource = Data;
StackingLineSeries series1= new StackingLineSeries();
ObservableCollection<ChartDataPoint> Data1 = new ObservableCollection<ChartDataPoint>
{
new ChartDataPoint("2006",32),
new ChartDataPoint("2007",43),
new ChartDataPoint("2010",54)
};
series1.ItemsSource = Data1;
chart.Series.Add(series);
chart.Series.Add(series1);
Constructors
StackingLineSeries()
Declaration
public StackingLineSeries()
Fields
StrokeDashArrayProperty
Gets or sets the dash array for the line. This is a bindable property.
Declaration
public static readonly BindableProperty StrokeDashArrayProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
StrokeDashArray
Gets or sets the dash array for the line. This is a bindable property.
Declaration
public double[] StrokeDashArray { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] | This property takes the double array as its value. |