I'm using the InfoVis JIT sunburst visualisation and modifying node and parent node color accordingly:
onBeforePlotNode: function(node)
{
if(node.data.risk == '1')
{
var parents = node.getParents()[0];
var gparents = parents.getParents()[0];
node.data.$color = '#fc9802';
parents.data.$color = '#fc9802';
gparents.data.$color = '#fc9802';
}
The problem I'm having is that the color settings are not visible until I move the cursor over any part of the visualisation.
- Interestingly the first of the color assignments works, node.data.$color = '#fc9802'; (before needing to move cursor):
Is there a way to refresh prior to render (or a better way of setting color)?
The solution was to employ a delay using
It appears that the delay in milliseconds does not matter - I used 1 and it still worked.