Based on Jason Davies’ implementation of Bridson’s algorithm. See the related explanation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "me", | |
"children": [ | |
{ | |
"name": "hobby", | |
"children" : [ | |
{ "name" : "ski" },{"name":"hiking"},{"name":"running"},{"name":"play guitar"},{"name":"play bass"}, | |
{ | |
"name":"listen to", | |
"children": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
day | min | max | median | q1 | q3 | number | |
---|---|---|---|---|---|---|---|
1 | 14 | 65 | 33 | 20 | 35 | 22 | |
2 | 25 | 73 | 25 | 25 | 30 | 170 | |
3 | 15 | 40 | 25 | 17 | 28 | 185 | |
4 | 18 | 55 | 33 | 28 | 42 | 135 | |
5 | 14 | 66 | 35 | 22 | 45 | 150 | |
6 | 22 | 70 | 34 | 28 | 42 | 170 | |
7 | 14 | 65 | 33 | 30 | 50 | 28 |
This example demonstrates the use of post-selection to customize an axis, even across transitions. After the axis is rendered, its elements (such as text labels, here) are reselected and modified to produce the desired appearance. When transitioning the axis, the post-selection modifies entering, updating and exiting elements. Passing null values to transition.tween cancels default tweens scheduled by the axis in favor of the customized styles.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
label | population | country | x | y | |
---|---|---|---|---|---|
San Francisco | 750000 | USA | 37 | -122 | |
Fresno | 500000 | USA | 36 | -119 | |
Lahore | 12500000 | Pakistan | 31 | 74 | |
Karachi | 13000000 | Pakistan | 24 | 67 | |
Rome | 2500000 | Italy | 41 | 12 | |
Naples | 1000000 | Italy | 40 | 14 | |
Rio | 12300000 | Brazil | -22 | -43 | |
Sao Paolo | 12300000 | Brazil | -23 | -46 |
See also the linear path tweening example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.marker-cluster-small { | |
background-color: rgba(181, 226, 140, 0.6); | |
} | |
.marker-cluster-small div { | |
background-color: rgba(110, 204, 57, 0.6); | |
} | |
.marker-cluster-medium { | |
background-color: rgba(241, 211, 87, 0.6); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!d3.chart) d3.chart = {}; | |
d3.chart.brush = function() { | |
var g; | |
var data; | |
var width = 600; | |
var height = 30; | |
var dispatch = d3.dispatch(chart, "filter"); | |
function chart(container) { |
Tweak some stuff
OlderNewer