Skip to content

Instantly share code, notes, and snippets.

View flacoman91's full-sized avatar

Richard Dinh flacoman91

  • EY
  • New York, NY
View GitHub Profile
@flacoman91
flacoman91 / data.csv
Last active December 4, 2018 14:54 — forked from d3noob/data.csv
Simple graph with filled area in v4
date close
1-May-12 58.13
30-Apr-12 53.98
27-Apr-12 67.00
26-Apr-12 89.70
25-Apr-12 99.00
24-Apr-12 130.28
23-Apr-12 166.70
20-Apr-12 234.98
19-Apr-12 345.44
@flacoman91
flacoman91 / README.md
Last active August 21, 2018 15:24 — forked from cool-Blue/README.md
Variable width bar chart with matching, data driven, variable width wordwrap

This example, using satirical data from The Onion, demonstrates how to wrap long axis labels to fit on multiple lines.

  1. Modified wrap to acept text wrap width as a function of data and index.
  2. Made bar widths proportional to values.

Note: The second point is not recommended practice but serves to ilustrate the variable wrap feature!

Updated to use D3v5

@flacoman91
flacoman91 / .block
Last active August 9, 2018 20:28 — forked from mbostock/.block
Bar Chart IIb
license: gpl-3.0
@flacoman91
flacoman91 / .block
Last active August 9, 2018 20:19 — forked from mbostock/.block
Bar Chart I
license: gpl-3.0
@flacoman91
flacoman91 / data.csv
Last active April 26, 2020 22:28 — forked from Andrew-Reid/data.csv
Grouped Bar Chart Toggle Series, update for d3v5
State Under 5 Years 5 to 13 Years 14 to 17 Years 18 to 24 Years 25 to 44 Years 45 to 64 Years 65 Years and Over
CA 2704659 4499890 2159981 3853788 10604510 8819342 4114496
TX 2027307 3277946 1420518 2454721 7017731 5656528 2472223
NY 1208495 2141490 1058031 1999120 5355235 5120254 2607672
FL 1140516 1938695 925060 1607297 4782119 4746856 3187797
IL 894368 1558919 725973 1311479 3596343 3239173 1575308
PA 737462 1345341 679201 1203944 3157759 3414001 1910571
@flacoman91
flacoman91 / .block
Last active February 27, 2020 19:31
map, pan zoom buttons - convert to d3v4
license: mit
@flacoman91
flacoman91 / .block
Created November 30, 2017 18:17
Zoom to Bounding Box II d3v4
license: gpl-3.0
@flacoman91
flacoman91 / .block
Last active November 29, 2017 17:04
rolling mercator attempt upgrade v4
license: mit
@flacoman91
flacoman91 / .block
Created November 29, 2017 16:07
Rolling pan and zoom with Mercator projection upgrade to v4 attempt.
license: mit
@flacoman91
flacoman91 / .block
Last active November 29, 2017 16:04
Rolling pan and zoom with Mercator projection
license: mit