-
FredrikJune 28, 2016 at 6:26 am #6256
To whom it may concern,
We just purchased the source code to your Halo visualization to try out for research purposes.
However, ideally we would like to order the different arc groups (PACs in your example) with regard to the CMTE_ID (so, we would like to force an order really, whereas now it seems “pseudo-randomly” sorted according to e.g. the number of links to that PAC?).
Is there a part of the code in which this could be done?
vizulyJune 28, 2016 at 6:35 am #6260Hello Fredrik,
To change the default sort order you will want to modify the sort operator on the haloLayout and/or the haloSliceLayout. These are both d3.layout.pie objects and here is a link on how to modify the sorts
https://github.com/d3/d3-3.x-api-reference/blob/master/Pie-Layout.md
The code in vizuly can be found at lines 151 and 157 in “src/viz/halo.js” function measure();
` // Set our halo layout properties
haloLayout.padAngle(scope.padAngle*radian)
.startAngle(0)
.endAngle(360*radian)
.value(function (d) { return d.value; });You will want to modify the above code with your own sort order with the .sort() method described in the link above.
– Tom
-
|
You must be logged in to reply to this topic.