Different color for each bar on a Bar chart


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Mukesh on 2nd July 2013
Hello,


How to give different colour to each bar in bar chart?

Thanks in advanced,


Mukesh
Posted by RGraph support on 2nd July 2013
Hi there,

You can set chart.colors.sequential to true and then specify chart.colors to contain your array of colors.




Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer
Posted by Mukesh on 2nd July 2013
Hi,

Thanks.

Can you tell me how to adjust keys in bottom in one horizontal line in bar chart?

Mukesh
Posted by RGraph support on 2nd July 2013
Hi there,

If you mean that you want to move the key to the bottom of your chart then you will need to use the x/y properties:

chart.key.position.x
chart.key.position.y

There's an example of a Pie chart with the key at the bottom here:

www.rgraph.net/docs/keys-in-charts.html




Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer
Posted by Mukesh on 2nd July 2013
Hi,

I want to add keys at bottom of bar chart but bar chart itself is taking full width and height of canvas.. So how to add keys at bottom of bar chart?
Posted by RGraph support on 2nd July 2013
Hi there,

You can either make space by increasing the bottom gutter or set a background color for the key with chart.key.background





Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer

Add a reply

 




« Back to message list
RGraph on social media