Skip to content

Instantly share code, notes, and snippets.

Lou King louking

Block or report user

Report or block louking

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@louking
louking / .block
Last active Nov 19, 2017
google map - d3 overlay, d3-tip, smooth transition
View .block
license: apache-2.0
height: 500
scrolling: no
border: yes
@louking
louking / .block
Last active Nov 7, 2017
overlapping labeled circles explode - select displays tip using d3-tip
View .block
license: apache-2.0
height: 500
scrolling: no
border: yes
@louking
louking / .block
Last active Nov 5, 2017
circles explode
View .block
license: apache-2.0
height: 500
scrolling: no
border: yes
@louking
louking / routes.json
Created Nov 3, 2017
runningroutes json data
View routes.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@louking
louking / .block
Last active Oct 31, 2017 — forked from mbostock/.block
Google Maps + D3
View .block
license: gpl-3.0
View fiddle.response.json
{
"data": [
{
"age": 71,
"agpercent": "68.12%",
"agtime": "1:26:56",
"date": "2015-03-22",
"miles": "13.1",
"name": "Arthur Gregory",
"pace": "9:09",
@louking
louking / README.md
Last active Jan 31, 2017 — forked from ZJONSSON/README.md
d3.legend example (d3 v4)
View README.md

d3.legend

d3.legend is a quick hack to add a legend to a d3 chart. Simply add a g and .call(d3.legend). Any elements that have a title set in the "data-legend" attribute will be included when d3.legend is called. Each title will appear only once (even when multiple items define the same data-legend) as the process uses a set based on a existing names, not an array of all items.

Color

By default the color in the legend will try to match the fill attribute or the stroke attribute of the relevant items. Color can be explicitly defined by attribute "data-legend-color"

Order

The order of items in the legend will be sorted using the top of the bounding box for each included item. The order can be explicitly defined by attribute "data-legend-pos"

You can’t perform that action at this time.