implementing an onclick event on the nodes of a spacetree with Javascript Infovis Toolkit

1.5k views Asked by At

I'm using the Infovis library to plot a spacetree.

Unfortunately there is a problem when implementing event on nodes as all nodes are false.

There already is a thread about it on the associated google group: https://groups.google.com/forum/?fromgroups#!topic/javascript-information-visualization-toolkit/NJtbe9hq5bQ

The solution given was to fix the 'contains' in NodeTypes: https://github.com/philogb/jit/blob/master/Source/Visualizations/Spacetree.js#L1370

I copy-pasted the new NodeTypes implementations, unfortunately it's still not working (nodes are still all false).

Any idea?

Edit: it's possible to do something close by creating a label on plot of the nodes.

1

There are 1 answers

1
L. Sanna On BEST ANSWER

This is a known bug as stated in the question, so only two solutions:

  1. correcting the library as shown on line 1370 of Spacetree.js
  2. using a work-around

I managed to implement the desired functionality by creating a label using the onPlot option for each node.