Graphics Reference
In-Depth Information
Note
If you need to change from CSV format to JavaScript data format, you
can either write a Python script, or use an online CSV-to-JavaScript
Object Notation (JSON) converter (for example, search for CSV2JSON
in Google).
This e-mail data has a few more attributes. For example, for nodes, it has
attributes such as shortname and recency , as shown here:
{ "id": 0, "name": "Maci Perkins", "shortname": "M.
Perkins",
"numEmail": 3, "sumSize": 448102, "recency": 200},
{ "id": 1, "name": "Garrett Aguilar", "shortname": "G.
Aguilar",
"numEmail": 2, "sumSize": 433735, "recency": 200},
{ "id": 2, "name": "Jada Ray", "shortname": "J. Ray",
"numEmail": 6, "sumSize": 701842, "recency": 145},
Figure 8-8 shows the results of using this data. The layout algorithm
automatically adjusts to fit all the data, because the scale factor and number
of items per row are based on the size of the data.
Changing the Layout
Some other types of layouts are fairly straightforward to calculate. The grid
layout shown in Figure 8-8 isn't perfectly a grid and could be improved by
rounding numbers rather than just using floating-point numbers.
 
Search WWH ::




Custom Search