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

StackOverflow https://stackoverflow.com/questions/10882683

  •  12-06-2021
  •  | 
  •  

Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top