Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
d3.js: the core concepts
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
itszero
July 19, 2015
Programming
1
2.4k
d3.js: the core concepts
A very introductory view of d3.js, comes with some code example people can play with.
itszero
July 19, 2015
Tweet
Share
More Decks by itszero
See All by itszero
Routing OpenStreetMap
itszero
0
1.4k
EcoSec
itszero
1
200
TaipeiFever
itszero
0
310
Other Decks in Programming
See All in Programming
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
270
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
940
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
300
CSC307 Lecture 05
javiergs
PRO
0
500
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
160
AtCoder Conference 2025
shindannin
0
1.1k
CSC307 Lecture 08
javiergs
PRO
0
670
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
Fragmented Architectures
denyspoltorak
0
150
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
99
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
Leo the Paperboy
mayatellez
4
1.4k
Why Our Code Smells
bkeepers
PRO
340
58k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
Git: the NoSQL Database
bkeepers
PRO
432
66k
エンジニアに許された特別な時間の終わり
watany
106
230k
Statistics for Hackers
jakevdp
799
230k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Transcript
d3.js: the Core Concepts Zero Cho
data visualization…?
None
so what is D3? d3 is an data visualization library
None
None
Data-Driven Documents notice how visualization is NOT in the title?
[ 1, 2, 3, 4 ] data <div/> <svg/> <canvas/>
HTML/SVG/else
geography time scale color geometry layout behavior data
geography time scale color geometry layout behavior data
step 1: SELECT … just like jQuery
d3.select(‘#ex1') .selectAll('.circle') .style('width', '100px') .style('height', '100px'); code
step 2: BINDING … where magic happens
const data = [50, 100, 200, 300]; const funNumToPx =
(num) => `${num}px`; d3.select(‘#ex2') .selectAll('.circle') .data(data) .style('width', funNumToPx) .style('height', funNumToPx); code http://codepen.io/itszero/pen/LVrwPJ
that’s not dynamic but, you say
given a data, you tell d3 to handle… • enter
• update • exit
let data = []; const count = nextInt(20); for(let i=0;i<count;i++)
{ data.push(nextInt(400)); } const funNumToPx = (num) => `${num}px`; const sel = d3.select('#ex3') .selectAll('.circle') .data(data); sel.enter() .append('div') .attr('class', 'circle'); sel.transition() .duration(500) .style('width', funNumToPx) .style('height', funNumToPx); sel.exit() .remove(); code enter: create basic div exit: remove the div update: update style prep: generate an array of random numbers http://codepen.io/itszero/pen/rVKXMp
now let’s checkout a more advanced example http://codepen.io/itszero/pen/RPBKbj
references • paper • 2011 InfoVis • website (examples) •
http://d3js.org/ • tutorials • https://square.github.io/intro-to-d3/