public static ChartTypeModel NewVerticallyStackedColumns(PenStyle.Builder penBuilder, bool isOneHundredPercent) { var collection = new VerticallyStackedColumnsCollection { IsOneHundredPercent = isOneHundredPercent }; for (var i = 0; i < 5; i++) { var dataSeries = new XyDataSeries <double, double> { SeriesName = "Series " + (i + 1) }; dataSeries.Append(DashboardDataHelper.XValues, DashboardDataHelper.YValues[i]); var rSeries = new StackedColumnRenderableSeries { DataSeries = dataSeries, StrokeStyle = penBuilder.WithColor(new Color(SeriesColors[i * 2])).WithThickness(1f, ComplexUnitType.Dip).Build(), FillBrushStyle = new LinearGradientBrushStyle(0, 0, 0, 1, new Color(SeriesColors[i * 2 + 1]), new Color(SeriesColors[i * 2]), TileMode.Clamp) }; collection.Add(rSeries); } var name = isOneHundredPercent ? "100% " : ""; name += "Stacked columns"; return(new ChartTypeModel(collection, name)); }
public static ChartTypeModel NewVerticallyStackedColumns(Context context, bool isOneHundredPercent) { var collection = new VerticallyStackedColumnsCollection { IsOneHundredPercent = isOneHundredPercent }; for (var i = 0; i < 5; i++) { var dataSeries = new XyDataSeries <double, double> { SeriesName = "Series " + (i + 1) }; dataSeries.Append(DashboardDataHelper.XValues, DashboardDataHelper.YValues[i]); var rSeries = new StackedColumnRenderableSeries { DataSeries = dataSeries, StrokeStyle = new SolidPenStyle(context, new Color(SeriesColors[i * 2])), FillBrushStyle = new LinearGradientBrushStyle(0, 0, 0, 1, new Color(SeriesColors[i * 2 + 1]), new Color(SeriesColors[i * 2])) }; collection.Add(rSeries); } var name = isOneHundredPercent ? "100% " : ""; name += "Stacked columns"; return(new ChartTypeModel(collection, name)); }
public static ChartTypeModel NewHorizontallyStackedColumns(PenStyle.Builder penBuilder) { var seriesCollection = new HorizontallyStackedColumnsCollection(); for (var i = 0; i < 5; i++) { var dataSeries = new XyDataSeries <double, double> { SeriesName = "Series " + (i + 1) }; dataSeries.Append(DashboardDataHelper.XValues, DashboardDataHelper.YValues[i]); var rSeries = new StackedColumnRenderableSeries { DataSeries = dataSeries, StrokeStyle = penBuilder.WithColor(new Color(SeriesColors[i * 2])).WithThickness(1f, ComplexUnitType.Dip).Build(), FillBrushStyle = new LinearGradientBrushStyle(0, 0, 0, 1, new Color(SeriesColors[i * 2 + 1]), new Color(SeriesColors[i * 2]), TileMode.Clamp) }; seriesCollection.Add(rSeries); } const string name = "Stacked columns side-by-side"; return(new ChartTypeModel(seriesCollection, name)); }
public static ChartTypeModel NewHorizontallyStackedColumns(Context context) { var seriesCollection = new HorizontallyStackedColumnsCollection(); for (var i = 0; i < 5; i++) { var dataSeries = new XyDataSeries <double, double> { SeriesName = "Series " + (i + 1) }; dataSeries.Append(DashboardDataHelper.XValues, DashboardDataHelper.YValues[i]); var rSeries = new StackedColumnRenderableSeries { DataSeries = dataSeries, StrokeStyle = new SolidPenStyle(context, new Color(SeriesColors[i * 2])), FillBrushStyle = new LinearGradientBrushStyle(0, 0, 0, 1, new Color(SeriesColors[i * 2 + 1]), new Color(SeriesColors[i * 2])) }; seriesCollection.Add(rSeries); } const string name = "Stacked columns side-by-side"; return(new ChartTypeModel(seriesCollection, name)); }