Colors for 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 Archana on 16th October 2013
hi...

how to get different colors in barchart?
Posted by RGraph support on 16th October 2013
Hi there,

Set chart.colors. I suspect that you might also want to set chart.colors.sequential to true too.


Richard, RGraph Support
Please remember to link to the RGraph website

Help support RGraph - single site license only £99
   www.rgraph.net/license#single-site
Posted by Archana on 16th October 2013
hi,

I am getting the following warnings,

canvas: an attempt to set strokeStyle or fillStyle to a value that is neither a string, a CanvasGradient, or a CanvasPattern was ignored.
context.fillStyle = colors[i];

canvas: an attempt to set strokeStyle or fillStyle to a value that is neither a string, a CanvasGradient, or a CanvasPattern was ignored.
this.context.fillStyle = this.properties['chart.colors'][i];

plz help me
Posted by RGraph support on 16th October 2013
Hi there,



They're only warnings - nothing to worry about. I see you have this in your code: this.context - which is not used any more so you could try upgrading.



Richard, RGraph Support
Please remember to link to the RGraph website

Help support RGraph - single site license only £99
    www.rgraph.net/license#single-site
Posted by Archana on 17th October 2013
hi,

hw can i show numbers with thousand separator in the barchart.
Posted by RGraph support on 17th October 2013
Hi there,

You can use the chart.scale.thousand option to specify what separator that you want to use.



Richard, RGraph Support
Please remember to link to the RGraph website

Help support RGraph - single site license only £99
   www.rgraph.net/license#single-site
Posted by Archana on 17th October 2013
hi,

No... this displays the bars with values >= 1000.
Wat i want is the values which are displayed in the bars
i.e;when the ondraw function displays values in the bar that values should be with 1000 separator.
for eg;10,000

Posted by RGraph support on 17th October 2013
Hi there,

For that I think you will need to use the RGraph.number_format() function:

www.rgraph.net/docs/api.html#functions.strings


Richard, RGraph Support
Please remember to link to the RGraph website

Help support RGraph - single site license only £99
   www.rgraph.net/license#single-site
Posted by Archana on 17th October 2013
hi...

can u give me an example for this one ...plz
i tried it but m getting error.
it will be r'lly helpful.
Posted by RGraph support on 17th October 2013
Hi there,

It's all explained in the API docs:

var str = RGraph.number_format(obj, 152345, 'p', '£');

The last two arguments are optional.


Richard, RGraph Support
Please remember to link to the RGraph website

Help support RGraph - single site license only £99
   www.rgraph.net/license#single-site

Add a reply

 




« Back to message list
RGraph on social media