Skip to content

Instantly share code, notes, and snippets.

View riccardoscalco's full-sized avatar
🐢
Thinking slowly

Riccardo Scalco riccardoscalco

🐢
Thinking slowly
View GitHub Profile
@riccardoscalco
riccardoscalco / file.md
Created May 6, 2015 07:22
Revert changes in a git repository

Discard changes on in working directory (no add, no commit)

$ git checkout -- <file>

Discard changes in working directory (no add, no commit)

$ git checkout -- .
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

D3.js Data-Join

Nota: Questo tutorial lavora con la console Javascript di Chrome, ma non dovrebbero esserci grosse differenze con altri browser.


Creare il seguente file index.html:

Selection

p = d3.selectAll("p")
p // [Array[0]]
p[0] // []
p.data() // []

Data-join

@riccardoscalco
riccardoscalco / Iframe of Interactive charts.markdown
Last active August 29, 2015 14:22
Iframe of Interactive charts

Scale SVG graphics with only css

Make SVG graphics responsive with CSS. Useful for scale down d3 charts on mobile devices.

A Pen by Riccardo Scalco on CodePen.

License.

@riccardoscalco
riccardoscalco / A tangram tribute powered by d3.js transitions.markdown
Created June 8, 2015 14:43
A tangram tribute powered by d3.js transitions
@riccardoscalco
riccardoscalco / Graphic representation of Network Meta Analysis (NMA) data..markdown
Created June 8, 2015 14:47
Graphic representation of Network Meta Analysis (NMA) data.