Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mod data views using hierarchies #28

Open
hski-github opened this issue May 16, 2021 · 1 comment
Open

Mod data views using hierarchies #28

hski-github opened this issue May 16, 2021 · 1 comment
Labels
documentation Issues related to documentation enhancements and missing topics

Comments

@hski-github
Copy link

hski-github commented May 16, 2021

In the section about hierarchies it could be better described how children and rows can be used.
https://tibcosoftware.github.io/spotfire-mods/docs/using-the-api/mod-data-views/#hierarchies

If I am right, you can also call rows not only on the last level (in the example "Spain"), but also already on the previous level (e.g. "Apples") and then you can all rows which are below that child ("2500" and "13500"), correct?

Would be useful to extend the example on using rows on lower level of the hierarchy. To my understanding that is actually the actual benefit of why you don't use dataView.rows(), but use dataView. hierarchy("X").root()....rows();

@objerke
Copy link
Collaborator

objerke commented May 17, 2021

Hi @hski-github! Great suggestion about adding further examples regarding how hierarchies can be used.

As the documentation states, the rows() method on any DataviewHierarchyNode computes the data view rows corresponding to the sub tree of the hierarchy node. This means it can be used on any level of the hierarchy. All nodes in the hierarchy have the same methods but only leaves have a leafIndex and non leaves have an array of children

@objerke objerke added the documentation Issues related to documentation enhancements and missing topics label Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues related to documentation enhancements and missing topics
Projects
None yet
Development

No branches or pull requests

2 participants