The current treemap data representation, where all node names must be 
unique, does not support some very reasonable use cases:

   1. Disk usage.
   2. Budget analysis
   
I propose a "simple" fix that is backwards compatible to the current 
implementation.
Support an optional column: data.addColumn('string', 'Header').  If this 
column is present, show the Header instead of the node ID, otherwise, 
behave as current.
Then arbitrary IDs could be used for the nodes.  For example:

data.addColumn('string', 'ID')
data.addColumn('string','Parent')
data.addColumn('number','Size')
data.addColumn('string', 'Header')
data.addRows([
  ['1', null, 0, 'root'],
  ['2', '1', 0, 'home'],
  ['6', '1', 0, 'work'],
  ['3', '2', 10, 'documents'],
  ['4', '2', 50, 'pictures'],
  ['5', '4', 50, 'photo.png'],
  ['7', '6', 70, 'documents'],
  ['8', '6', 200, 'pictures',],
  ['9', '8', 150, 'photo.png'],
]);

On Thursday, May 26, 2011 5:45:40 PM UTC-4, NA wrote:
>
> Suppose that your DataTable has repeated values for some leaf nodes. 
> The treemap combines those leaves together under each parent node for 
> which any of them appear.  This means that the leaf nodes appear under 
> parent nodes that they do not belong to. 
>
> It appears that there is an assumption being made internally by the 
> treemap code that the values for the leaf node are unique.  This may 
> not be the case - instead, uniqueness can be guaranteed by combining 
> the value along with the row number. 
>
> Are there any workarounds to this?  I can prob post an example if this 
> is really needed, but I suppose that by now this may be a known 
> issue. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/VYRQZaWL_7AJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to