0

I am working with google charts for the first time and I would like to know 2 things:

  1. Is there a way in the api to update an already created node's father? Because my problem is that I have to build a tree top-down, that is to say, that I know the children of every node but not their parents, so I, first, create them empty and later set their father. However, it does not seem to work.

I have tried an approach like this one but the parent column seems to be outside of scope.

  1. how to make it stick to the container? I have tried lots of things including bootstrap and cant get the basic example to fit.

For this one, I tried this way but id did not work either.

Community
  • 1
  • 1
Leonardo Lanchas
  • 1,616
  • 1
  • 15
  • 37

1 Answers1

1

There is no way to solve the first issue but to process the tree from the root and descend recursively to its children.

The second one, make the table fit to the container, is solved with 3 lines of css:

table { max-width: 100%; table-layout: fixed; width: 100%; }
Leonardo Lanchas
  • 1,616
  • 1
  • 15
  • 37