GraphStream Users

Archives de la liste Aide


Re: changing basic node/edge attributes in displayed graphs


Chronologique Discussions 
  • From: Luc Hogie <Luc.Hogie AT inria.fr>
  • To: graphstream-users AT litislab.fr
  • Cc: Antoine Dutot <antoine.dutot AT gmail.com>
  • Subject: Re: changing basic node/edge attributes in displayed graphs
  • Date: Tue, 28 Jun 2011 11:35:57 +0200

Thanks Antoine for your detailed reply.

Then to dynamically change the color of a node, you merely store a
"ui.color" attribute on the node with a real number between 0 and 1, the
value being interpolated between the colors described by fill-color. If
you have two colors, 0.5 is a mix of the two colors, 0 is the first
color and 1 the second color. If you have 3 colors, increments of 0.5
(0, 0.5, 1) give you each exact color and values in between give you a
mix of the two closest colors... etc.

Nice. Does this mechanism work with properties other that the color?

To change dynamically the size of an object, you can use the "size-mode"
CSS property:

node.changingSize {
size-mode: dyn-size;
}

Then to change its size you can use the "ui.size" attribute, giving it

So why not providing a "dyn-color" mode?




Archives gérées par MHonArc 2.6.16.

Top of page