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. Image for the cookie policy date
close icon

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

Hi, 
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)
Thanks

Bruno

2 Replies

BC Bruno Calzetta 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
           


SS Sheik Syed Abthaheer M Syncfusion Team 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.

Regards,

M. Sheik


Loader.
Live Chat Icon For mobile
Up arrow icon