Graphics Reference
In-Depth Information
label.map( 'fill' ).from( 'group' ).using(roseColorKey);
label.map( 'font-size' )
.from( 'rose.linksIn.totals.sectorMax' ).using(labelKey);
// Draw it all
usa.all().redraw();
}
Execute the code and you will see the rose diagram shown in Figure 13-7 .
To create the diagram shown in Figure 13-6 (which represents only the sum
total of flow using a single color), remove the mapping of series-count
in the radial layers, and replace references to series value data with totals. If
you want to focus more exclusively on the proportion of regional transport
to the whole, a middle-ground option is to show one colored series only
from the second example for flow local to the group, and another for the
remainder in the gray tone used in the first example.
Nowthatyouhaveavisualsummaryoftransportbetweenstates,itwouldbe
useful to have a method of getting detail for a single focused one. It is clear
to which states many of the sectors point, but not all. One option would be
to show the subset from each of the other nodes that involves the focused
node and fade out the rest. A simpler approach would be to show links for
the focused node.
One advantage of using links is that the scale can be made relative to the
focused state, which will ensure that details are easy to see for smaller nodes
as well. At the bottom of your construct function add an empty link layer,
as shown here:
// ...
var linkLayer = usa.addLayer( aperture.LinkLayer );
linkLayer.map( 'link-style' ).asValue( 'arc' );
linkLayer.map( 'source' )
.from( 'source' );
linkLayer.map( 'source-offset' )
Search WWH ::




Custom Search