Bubble chart without the bubble gradients


« 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 Jan Dirk on 15th June 2016
Hi Richard,

Currently, the Bubbles in a Scatter chart always displayed with a gradient. I would however like to have it without gradient.
Is it possible currently somehow to create the bubbles without gradient? Otherwise can this been seen as an enhancement?

Regards,

Jan Dirk
Posted by Richard on 15th June 2016
Hi,

You'd have to alter the source at the moment - but I can add an option for it.

On or around line 2687 there's the line with just 'white' on it. This is where the gradient is being made. Chang this line to be exactly the same as the line beneath it. so the line looks like this:



obj.data[0][i][2] ? obj.data[0][i][2] : obj.properties['chart.defaultcolor'],



(with a comma at the end).



Richard

PLEASE READ:

If RGraph has helped you please give your feedback - thanks! You can give your feedback or leave a testimonial by adding a forum post or clicking on the speech bubble icon at the very top right.

But most of all: Please link to the RGraph website! (get information by clicking on the chain icon at the top right of the page)
Posted by Jan Dirk on 15th June 2016
I have indeed altered the source for it, but I prefer not changing the RGraph sources, when possible.
I you could make an option for it, than that would be great. Otherwise I'll patch indeed the RGraph sources (with every new release I use).

Actually I changed

                        co.fillStyle = RG.RadialGradient(obj,
                             obj.coords[0][i][0] + (r / 2.5),
                             obj.coords[0][i][1] - (r / 2.5),
                             0,
                             obj.coords[0][i][0] + (r / 2.5),
                             obj.coords[0][i][1] - (r / 2.5),
                             r,
                             'white',
                             obj.data[0][i][2] ? obj.data[0][i][2] : obj.properties['chart.defaultcolor']
                         );

into

                         co.fillStyle = obj.data[0][i][2] ? obj.data[0][i][2] : obj.properties['chart.defaultcolor'];


Regards,

Jan Dirk
Posted by Richard on 15th June 2016
Hi there,

OK I've added a colorsBubbleGraduated option to facilitate this.






Richard

PLEASE READ:

If RGraph has helped you please give your feedback - thanks! You can give your feedback or leave a testimonial by adding a forum post or clicking on the speech bubble icon at the very top right.

But most of all: Please link to the RGraph website! (get information by clicking on the chain icon at the top right of the page)

Add a reply

 




« Back to message list
RGraph on social media