Hierarchical view using javascript from a csv file.

20 views
Skip to first unread message

AJ. Hazly Mohammed

unread,
Oct 11, 2015, 1:54:27 PM10/11/15
to Google Visualization API

I want to create a hierarchical view using two 3 columns of csv file. 1 column is a parent, the other is child. and the other is value.

ex:


col1 (child)          col2 (parent)               col3
----------------------------------------------------------------
     1                      1                          54.453
     2                      1                         60.323
     3                      2                         769.00
     5                      2                         34.11
    10                     3                         788.889


Output like..

1 - 1 : 54.453
     1 - 2 : 60.323
          2 - 3 : 769.00
               3 - 10 : 788.889
          2 - 5 : 34.11

This should be achieved just using Javascript. no any other language or Javascript libraries. Pure Javascript.

Please help me. Please provide your suggestions and also answers too if possible.

Daniel LaLiberte

unread,
Oct 11, 2015, 2:00:51 PM10/11/15
to Google Visualization API
A.J. you should check out the TreeMap chart since it supports that data structure:  https://developers.google.com/chart/interactive/docs/gallery/treemap

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/572d02e2-d9d4-4880-88b4-e8cd4ebfe010%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
dlaliberte@Google.com   5CC, Cambridge MA
daniel.laliberte@GMail.com 9 Juniper Ridge Road, Acton MA
Reply all
Reply to author
Forward
0 new messages