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
itszero
July 19, 2015
Programming
2.5k
1
Share
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
More Decks by itszero
See All by itszero
Routing OpenStreetMap
itszero
0
1.4k
EcoSec
itszero
1
210
TaipeiFever
itszero
0
320
Other Decks in Programming
See All in Programming
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
1.1k
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
390
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
370
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.6k
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
150
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
180
cloudnative conference 2026 flyle
azihsoyn
0
170
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
260
Explore CoroutineScope
tomoeng11
0
180
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
500
Featured
See All Featured
Accessibility Awareness
sabderemane
1
110
The untapped power of vector embeddings
frankvandijk
2
1.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Prompt Engineering for Job Search
mfonobong
0
300
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
440
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
690
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The agentic SEO stack - context over prompts
schlessera
0
770
First, design no harm
axbom
PRO
2
1.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
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/