mages / googleVis

Interface between R and the Google Chart Tools
https://mages.github.io/googleVis/
360 stars 155 forks source link

gVisOrgChart #83

Closed prabhjot0509 closed 5 years ago

prabhjot0509 commented 5 years ago

Hi,

I really love the way we can create Org Charts using this package. I was wondering is there a way we can restrict the hierarchy to be displayed to up to 2nd or 3rd level. I have a really big data set having 12 levels. Showing all 12 levels to the user when the chart is rendered doesn't really look good. Is there a possibility to restrict the default output to 3rd or 4th level and the user can double click on the nodes if we want to see below that level.

Regards

mages commented 5 years ago

I don't think so. The options provided in the Google Chart Tools appear quite limited: https://developers.google.com/chart/interactive/docs/gallery/orgchart

prabhjot0509 commented 5 years ago

Thank you so much for your response. Even i could not find a way to do this. I gave it a little thought and just came up with another idea but for that i might need a small help. Is that possible to fetch the node which user has clicked on. For example, in the attached screenshot, Screenshot if a user has double clicked on any particular node in the 2nd level, can i store the value of the node on which he has clicked. If the user has clicked on 18902, i want to store that value in a variable in R