Class StackingBar100Series
To render a 100% stacked bar chart, create an instance of the StackingBar100Series class, and add it to Series collection property and set the required properties.
Inheritance
Inherited Members
Namespace: Syncfusion.SfChart.XForms
Assembly: Syncfusion.SfChart.XForms.dll
Syntax
public class StackingBar100Series : StackingBarSeries, IThemeElement
Remarks
StackingBar100Series is the transposed version of StackingColumn100Series. Unlike other cartesian chart types, to plot StackingBarSeries, x-axis will be rendered vertically and y-axis will be rendered horizontally. Hence, it is not possible to plot other chart types along with StackingBarSeries. Multiple StackingBarSeries can be added in a single SfChart. StackingBarSeries requiresItemsSource, 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();
StackingBar100Series series = new StackingBar100Series();
ObservableCollection<ChartDataPoint> Data = new ObservableCollection<ChartDataPoint>
{
new ChartDataPoint("2006",28),
new ChartDataPoint("2007",68),
new ChartDataPoint("2010",38)
};
series.ItemsSource = Data;
StackingBar100Source series1 = new StackingBar100Series();
ObservableCollection<ChartDataPoint> Data1 = new ObservableCollection<ChartDataPoint>
{
new ChartDataPoint("2006",32),
new ChartDataPoint("2007",34),
new ChartDataPoint("2010",32)
};
series1.ItemsSource = Data1;
chart.Series.Add(series);
chart.Series.Add(series1);
Constructors
StackingBar100Series()
Declaration
public StackingBar100Series()