Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
create bar chart with different color in single bar
Saggy123
hi,
I need to create bar chart.
in that chart one bar can have different color depending on some calculation.
as shown in attached file.
if any one knows. please help me.
and thanks in advance.
Find more posts tagged with
Comments
kclark
I'm not sure what calculation you are using but you can change the color in beforeDrawDataPoint()<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function beforeDrawDataPoint( dph, fill, icsc ) {
var sValue = dph.getDisplayValue();
if (sValue.contains("SOMELABEL")) {
fill.set(148, 198, 222);
}
}
</pre>
<br />
That'll change the color if SOMELABEL matches, you can modify the same code to change the colors depending on your calculation.
Saggy123
thanks !!!