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

Color for each bar in bar chart and Adornments inside the bar if it fits or outside if it doesn't

Thread ID:





111168 Sep 11,2013 09:28 AM UTC Sep 16,2013 07:05 AM UTC WPF 2
Tags: Chart
Bruno Calzetta
Asked On September 11, 2013 09:28 AM UTC

We are using v9.403.0.62 and we have a requirement of having each bar of a bar chart of a specific color (depending on the data) and the adornments showing the data inside each bar if it fits or outside if it doesn't (for example for small qty, we need to show the data outside as there's no room inside the bar)


Bruno Calzetta
Replied On September 11, 2013 10:13 AM UTC

this is working for the color (on the targetupdated event):

for( var i = 0; i < chartSeries.Segments.Count; i++ )
       chartSeries.Segments[i].Interior = chartSeries.Area.ColorModel.CurrentPalette[i];

but still having issues with the adornments

Sheik Syed Abthaheer M [Syncfusion]
Replied On September 16, 2013 07:05 AM UTC

Hi Bruno,

Thanks for using Syncfusion products.

We have analyzed your query and you can also achieve your requirement (applying color for each bar segment) by using ColorEach property of ChartSeries.

Also we would like to inform you that, currently we do not have support to apply color for each Adornment Label. We are able to apply single color for entire Adornment label by using AdornmentForeground property of ChartAdornmentInfo

Please let us know if you need any further assistance.


M. Sheik


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