We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfChart ColumnSeries: How to set the colors of the Bars

Thread ID:

Created:

Updated:

Platform:

Replies:

110866 Aug 28,2013 10:55 AM UTC Aug 30,2013 05:46 AM UTC WinRT 1
loading
Tags: SfChart
Mark Buggermann
Asked On August 28, 2013 10:55 AM UTC

I'm using a SfChart with two Columnseries and i want to specify the Color of each Bar.

I've tried usind ColumnSeries.ColorModel, which had no effect and also tried the Background Property of the ColumnSeries which had no effect.

<Charts:ColumnSeries Label="Positive Transactions" 
                                              XBindingPath="Category"
                                              YBindingPath="Value" >
                    <Charts:ColumnSeries.ColorModel>
                        <Charts:ChartColorModel>
                            <Charts:ChartColorModel.CustomBrushes>
                                <SolidColorBrush Color="{StaticResource BlackColor}" />
                            </Charts:ChartColorModel.CustomBrushes>
                        </Charts:ChartColorModel>
                    </Charts:ColumnSeries.ColorModel>
                </Charts:ColumnSeries>

Muneesh Kumar G [Syncfusion]
Replied On August 30, 2013 05:46 AM UTC

Hi Mark,

Thanks for using Syncfusion Products.

We can achieve your requirement by Setting Palette=Custom in ColumnSeries as follows:

Code snippet [XAML]:

 <chart:ColumnSeries  Palette="Custom" ItemsSource="{Binding CategoricalDatas}"  XBindingPath="Category" YBindingPath="Value" Label="First" >

We have prepared a sample based on this and you can find the sample under the following location:

Please let us know if you have any queries,

Regards,

Muneesh Kumar G.

 



Column_Chart_Demo_d709bf7d.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;