Reputation: 780
Im using the InfoVis javascript onBeforePlotNode method to set node colours.
onBeforePlotNode: function(node)
{
if(node.data.mytype == "type1")
{
node.data.$color = '#d9d9d9'; //light grey
}
}
What is best way to change node color after the visualisation has been rendered?
Ive tried
sb.graph.nodes["mynode"].data["$color"] = "#fff";
sb.refresh();
but this will only work if the onBeforePlotNode is not used to set color
Any suggestions?
Upvotes: 1
Views: 33