Created by Christopher Manning
Draws a force directed graph using svg:path and geo projections onto a sphere.
I combined Mike Bostock's [Zoomable Sunburst](http://bl.ocks.org/mbostock/4348373) and [Sunburst Partition](http://bl.ocks.org/mbostock/4063423) examples, so that I could have both zooming and updating the underlying data (between count and size, in this case). A simple combination of the examples does not work; you have to edit the arcTween function used for updating the data, so that when it redraws the partition layout, it takes account of the current zoom level by adjusting the domain of the x scale. | |
Click on any arc to zoom in, and click on the center circle to zoom out. Use the Size/Count radio buttons to update the data. |
Created by Christopher Manning
Draws a force directed graph using svg:path and geo projections onto a sphere.
license: gpl-3.0 | |
height: 960 |
This example demonstrates how to prevent D3’s force layout from moving nodes that have been repositioned by the user. When the force layout’s drag behavior dispatches a dragstart event, the fixed property of the dragged node is set to true. This prevents the force layout from subsequently changing the position of the node (due to forces). Double-click to release a node.
Internally, the force layout uses three bits to control whether a node is fixed. The first bit can be set externally, as in this example. The second and third bits are set on mouseover and mousedown, respectively, so that nodes are fixed temporarily during dragging. Although the second and third bits are automatically cleared when dragging ends, the first bit stays true in this example, and thus nodes remain fixed after dragging.
Also note that the force layout resumes au
This example demonstrates how to prevent D3’s force layout from moving nodes that have been repositioned by the user. When the force layout’s drag behavior dispatches a dragstart event, the fixed property of the dragged node is set to true. This prevents the force layout from subsequently changing the position of the node (due to forces). Double-click to release a node.
Internally, the force layout uses three bits to control whether a node is fixed. The first bit can be set externally, as in this example. The second and third bits are set on mouseover and mousedown, respectively, so that nodes are fixed temporarily during dragging. Although the second and third bits are automatically cleared when dragging ends, the first bit stays true in this example, and thus nodes remain fixed after dragging.
Also note that the force layout resumes au
license: gpl-3.0 |
Word cloud implementation. | |
Example of how to | |
1. Change style from default. Uses linear scale | |
2. Alter word size | |
3. "Fit" it into the screen. At first the words were appearing out of view to the left. |
name | p1 | p2 | p3 | p4 | p5 | p6 | |
---|---|---|---|---|---|---|---|
Rose Reber | 0.626 | 1.016 | 2.195 | -1.662 | -0.533 | 1.256 | |
Pansy Paisley | -1.026 | -0.272 | 2.083 | 0.688 | -1.270 | -1.770 | |
Nathaniel Nace | -0.182 | 3.786 | 2.599 | -1.688 | 1.442 | -0.679 | |
Leon Leblanc | 2.522 | 4.166 | -1.782 | 3.723 | 1.867 | 1.240 | |
Verla Vanish | 1.997 | 3.576 | -1.288 | 1.729 | 0.731 | 0.310 | |
Shona Sigmon | 1.960 | 3.719 | -1.421 | 1.785 | 0.777 | 0.265 | |
Columbus Cartee | 2.057 | 3.908 | -2.608 | 3.596 | 2.256 | 1.528 | |
Sunni Stalzer | -2.481 | -2.642 | 0.234 | 1.690 | 1.484 | 0.501 | |
Wes Wahl | 2.487 | 3.942 | -1.664 | 3.296 | 2.371 | 1.096 |
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |