Hi, I'm not sure I understand what issue you're seeing. Can you please make jsfiddle demonstrating your issue?
- Sergey On Wed, Oct 16, 2013 at 5:40 PM, SangR <[email protected]>wrote: > Hi, > > I have a similar need and tried the suggestion of using DataTable's apis > as follows: > > setValue(row1, column0, "MYNODEID") and > setFormattedValue(row1, column0, "NODE FORMATTED VALUE"); > > Doing this maintains parent child hierarchy only for one level (the child > and its parent) and breaks the hierarchy below that. Meaning there are more > than one root nodes with its children rendered in the OrgChart. > > What works is using the following APIs on DataTable: > 1. Create a Property to attach to every row that carries the NodeID (or > any other specific information) we need for each row > Properties rowProperties = Properties.create(); > rowProperties.set("KEYNAME", "MYNODEID"); > > 2. Set this property to a specific cell as follows: > setCell(row1, column0, "SOMEVALUE", "NODE FORMATTED VALUE", rowProperties); > > Now, with this set for each row on the Node selection event handler it can > be accessed from the underlying table as follows: > String NodeId = dataTable.getProperty(row1, column0, "KEYNAME"); > > This works for me. > > However wondering if the implementation of setValue and setFormattedValue > in DataTable is somehow broken ? > > Thanks, > Sangeetha > > > On Monday, March 29, 2010 4:30:04 AM UTC-4, Viz Kid wrote: >> >> >> Hi. >> >> The displayed name of the node is the formatted value of the name rather >> then simply the name string. Therefore, you can have the name be actually >> anything you like (even the strings which indicates the row numbers) and >> the formatted values would be the real names of the nodes. This way you can >> have as many identical names as you like. >> >> Hope this helps, >> Viz Kid >> >> On Sat, Mar 27, 2010 at 7:51 PM, Dinçer <[email protected]> wrote: >> >>> When using organization chart, there I need a few nodes with same >>> names like 'John Doe' the manager and 'John Doe' the accountant. But >>> the relation in org chart is maintained through the "Name" information >>> which confuses the chart. >>> >>> How could we have two nodes with same names? Is there any possibility >>> to define parent-child relatinship through Node ID? >>> >>> Thanks >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google Visualization API" group. >>> To post to this group, send email to google-visua...@**googlegroups.com. >>> To unsubscribe from this group, send email to google-visualization-api+* >>> *[email protected]. >>> For more options, visit this group at http://groups.google.com/** >>> group/google-visualization-**api?hl=en<http://groups.google.com/group/google-visualization-api?hl=en> >>> . >>> >>> >> -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to > [email protected]. > Visit this group at > http://groups.google.com/group/google-visualization-api. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/groups/opt_out.
