GraphStream Users

Archives de la liste Aide

Re: pie-charts colors update

Chronologique Discussions 
  • From: Antoine Dutot <antoine.dutot AT>
  • To: graphstream-users AT, remy <remy.cazabet AT>
  • Subject: Re: pie-charts colors update
  • Date: Tue, 27 Mar 2012 11:11:16 +0200

Hi Remy,

Indeed, this was a bug. It should be corrected on the git repository, and the jar will be available for download in the nightly builds tomorrow :

In the meantime, note that changing the color (or colors for pie-chart shapes) of a node by changing its entire style is not the most effective way to do it. You can have a look at this page for more recommendations on how to dynamically change the style of an element :

Thank you for your bug report,



Le 26 mars 2012 14:16, remy <remy.cazabet AT> a écrit :
I try to use pie-charts to represent my nodes, but I need to change their
colors dynamically.
I'm using
n.setAttribute("", "shape:pie-chart;fill-color:XXX").

It works well the first time, but if I do it again with new colors, it keeps
the old ones. It seems to be an actualization problem, because if I first
change the shape to a cross for example, then I can correctly set the colors
for the pie-chart anew. (But only if the cross is displayed. If I change to a
cross, them come back to a pie-chart without graphic update, it keeps the old

To give a concrete example of the problem, if I write

n.setAttribute("", "shape:pie-chart;fill-color:red");

n.setAttribute("", "shape:pie-chart;fill-color:blue");

the node stays red.

Do you have a solution ? Thanks

Archives gérées par MHonArc 2.6.16.

Top of page