Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View musically-ut's full-sized avatar
🐙
🐢 🎣 🐠

Utkarsh Upadhyay musically-ut

🐙
🐢 🎣 🐠
View GitHub Profile
@musically-ut
musically-ut / README.md
Last active March 8, 2016 16:27 — forked from mbostock/.block
SunBurst with selection rotation

This example is an extension of the original example with the additional feature that clicking on a part of the graph will select it and rotate it to 90 deg.


A sunburst is similar to the treemap, except it uses a radial layout. The root node of the tree is at the center, with leaves on the circumference. The area (or angle, depending on implementation) of each arc corresponds to its value. Sunburst design by John Stasko. Data courtesy Jeff Heer.

@musically-ut
musically-ut / README.md
Last active December 12, 2015 08:49 — forked from mbostock/.block

This is an adaption of a Zoomable sunburst example with an added text box showing which item was last clicked.


Click on any arc to zoom in. Click on the center circle to zoom out.

A sunburst is similar to a treemap, except it uses a radial layout. The root node of the tree is at the center, with leaves on the circumference. The area (or angle, depending on implementation) of each arc corresponds to its value. Sunburst design by John Stasko. Data courtesy Jeff Heer.

@musically-ut
musically-ut / README.md
Last active December 12, 2015 08:59 — forked from mbostock/.block
Interacting with elements on brushes

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.

@musically-ut
musically-ut / README.md
Last active December 28, 2015 12:49 — forked from mbostock/.block

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.

@musically-ut
musically-ut / README.md
Last active December 28, 2015 12:58 — forked from mbostock/.block
Set the initial zoom level of a brush.

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.

@musically-ut
musically-ut / flare.json
Last active December 28, 2015 15:39 — forked from mbostock/.block
Tree layout with root collapsed
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},
@musically-ut
musically-ut / README.md
Last active December 29, 2015 16:49 — forked from mbostock/.block
6 hour marks with d3's time axis.

The tick format provided by d3.time.scale is a multi-scale tick format, meaning that it formats times differently depending on the time. For example, the start of February is formatted as "February", while February second is formatted as "Feb 2". The format is implemented using an array of time formats, each with an associated filter. The first filter that returns true is used. (In the implementation below, the formats are processed in reverse order.) You can create your own custom multi-scale time format using the same technique with only a few lines of code.

This format prints only hours of days, rounding them to the nearest 6 hours mark.

@musically-ut
musically-ut / README.md
Last active December 29, 2015 16:49 — forked from mbostock/.block
D3's time axis with 6 hour marks.

The tick format provided by d3.time.scale is a multi-scale tick format, meaning that it formats times differently depending on the time. For example, the start of February is formatted as "February", while February second is formatted as "Feb 2". The format is implemented using an array of time formats, each with an associated filter. The first filter that returns true is used. (In the implementation below, the formats are processed in reverse order.) You can create your own custom multi-scale time format using the same technique with only a few lines of code.

This format prints only hours of days, rounding them to the nearest 6 hours mark.

Food by Deliciousness
Source: Andrew Parnell
Metadata Notes: Things I think are yummy
Food Rating
Bananas 7
Green Beans 5
Egg Salad Sandwich 3
Ice Cream 5
Vegemite 8
button {
font: 14px Helvetica Neue;
background-color: #222;
background-image: -moz-linear-gradient(top, rgba(255,255,255,.25), rgba(255,255,255,.11));
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255,255,255,.25)),color-stop(1, rgba(255,255,255,.11)));
background-image: -webkit-linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,.11));
color: #fff;
text-rendering: optimizeLegibility;
text-shadow: 0 -1px 1px #222;
padding: 6px 10px 6px 10px;