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

Update color of column series based on values?

Thread ID:





126173 Sep 28,2016 01:52 PM UTC Oct 3,2016 12:18 PM UTC Xamarin.Forms 3
Tags: SfChart
Matthew Sebastian
Asked On September 28, 2016 01:52 PM UTC

We are looking to use the graph component as a live ui warning for the users of our application. We live update the values of a column series, and are looking to color code each item based on a limit, for example 0-100 red, 100-200 green, 200-300 yellow.

I had constructed SeriesBrushes = List<Color>, one per item in our graph. I can set the color initially, but they don't seem to ever change when modified

        <chart:ColumnSeries x:Name="popSeries" ItemsSource="{Binding Data}" XBindingPath="Name"
                            YBindingPath="Pop" LegendIcon="Rectangle" Label="Population"
                            ListenPropertyChange="{Binding ListenUpdateChange}"  EnableTooltip="True">
            <chart:ChartColorModel Palette="Custom" CustomBrushes="{Binding SeriesBrushes}">

Should this work, or is their a better way to programatically change the color of an item in a series live?

Yuvaraj Palanisamy [Syncfusion]
Replied On September 30, 2016 03:50 AM UTC

Hi Matthew Sebastian, 
We have prepared a sample as per your requirement. Please find the sample from the below location, 

Matthew Sebastian
Replied On September 30, 2016 02:17 PM UTC

It seems that reassigning the colormodel on each update is what I needed to fix my problem.

I modified the provided sample to change individual points and update their color on the timer. In the meanwhile, I had also reproduced the chart we needed by using a stackedcolumn chart with 3 series, and only using one series per column at a time.

I've attached the modified sample just for reference

Attachment: ModifiedSample_fc20f5ae.7z

Jaikrishna Chandrasekar [Syncfusion]
Replied On October 3, 2016 12:18 PM UTC

Hi Matthew,

We had modified a sample by adding 3 stacking column series and it can be download from the below location

Sample: http://www.syncfusion.com/downloads/support/forum/126173/ze/ModifiedSample_21344766240  

Note: If the provided sample would not meet your requirement, please provide us more details about your requirement, which will help us to provide a better solution.

Jaikrishna C


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

This page will automatically be redirected to the 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