2X faster development
The ultimate UWP UI toolkit to boost your development speed.
Description: This article describes how the segments interior is applied from the colors that specified in the underlined model of the ItemsSource. Solution: Chart provides Custom palette support to give you a set of brushes for each data point. Your model has three properties for defining the X, Y, and color values. The CustomBrushes property can be defined as shown in the following code example. C# Viewmodel view = new Viewmodel(); ColumnSeries columnSeries = new ColumnSeries(); columnSeries.ItemsSource = view.SneakersDetail; columnSeries.XBindingPath = "Brand"; columnSeries.YBindingPath = "No_Of_Items"; columnSeries.Palette = ChartColorPalette.Custom; //Adding colorModel to the series ChartColorModel colorModel = new ChartColorModel(); foreach (var item in view.SneakersDetail) view.SeriesColor.Add(item.SegmentColor); colorModel.CustomBrushes = view.SeriesColor; columnSeries.ColorModel = colorModel; Output:Figure 1: ColumnSeries with specific interior color. |
2X faster development
The ultimate UWP UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.