This examples demonstrates how to use D3's brush component to implement focus + context zooming. Click and drag in the small chart below to pan or zoom.
Instantly share code, notes, and snippets.
Dave Tonge davidgtonge
davidgtonge
/ logstash.conf
Last active
August 29, 2015 14:07
— forked from pblittle/logstash.conf
This file contains hidden or 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
input {
syslog {
add_field => {
"docker" => "true"
}
}
}
output {
davidgtonge
/ README.md
Last active
December 12, 2015 00:08
— forked from mbostock/.block
davidgtonge
/ README.md
Last active
December 10, 2015 12:29
— forked from mbostock/.block
This stacked bar chart is constructed from a CSV file storing the populations of different states by age group. The chart employs conventional margins and a number of D3 features:
- d3.csv - load and parse data
- d3.scale.ordinal - x-position encoding and color encoding
- d3.scale.linear - y-position encoding
- d3.format - SI prefix formatting (e.g., "10M" for 10,000,000)
- d3.max - compute domains
- d3.keys - compute column names
- d3.svg.axis - display axes