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
SVG Graph Animation
Search
namikuguri
July 11, 2016
Technology
0
220
SVG Graph Animation
グラフアニメーションが作れるライブラリの紹介
namikuguri
July 11, 2016
Tweet
Share
More Decks by namikuguri
See All by namikuguri
実例から学ぶ CSSアニメーション
namikuguri
1
1.4k
かるくCalc()
namikuguri
0
160
SVG Basic
namikuguri
0
210
石
namikuguri
0
79
僕はあの日夕暮れ時に書いたスタイルガイドを忘れない
namikuguri
0
850
誰と作るデザイン?
namikuguri
0
610
CSS の構造化、その目的
namikuguri
0
100
fitme
namikuguri
0
72
About color
namikuguri
0
96
Other Decks in Technology
See All in Technology
技術者はかっこいいものだ!!~キルラキルから学んだエンジニアの生き方~
masakiokuda
2
280
AWSで作るセキュアな認証基盤with OAuth mTLS / Secure Authentication Infrastructure with OAuth mTLS on AWS
kaminashi
0
190
グループ ポリシー再確認 (2)
murachiakira
0
120
Databricksで完全履修!オールインワンレイクハウスは実在した!
akuwano
0
110
Running JavaScript within Ruby
hmsk
3
400
白金鉱業Meetup_Vol.18_生成AIはデータサイエンティストを代替するのか?
brainpadpr
3
180
OPENLOGI Company Profile for engineer
hr01
1
24k
AIと共に乗り越える、 入社後2ヶ月の苦労と学習の軌跡
sai_kaneko
0
130
AIコーディングの最前線 〜活用のコツと課題〜
pharma_x_tech
4
2.7k
テストって楽しい!開発を加速させるテストの魅力 / Testing is Fun! The Fascinating of Testing to Accelerate Development
aiandrox
0
120
AWSのマルチアカウント管理 ベストプラクティス最新版 2025 / Multi-Account management on AWS best practice 2025
ohmura
4
340
Classmethod AI Talks(CATs) #21 司会進行スライド(2025.04.17) / classmethod-ai-talks-aka-cats_moderator-slides_vol21_2025-04-17
shinyaa31
0
630
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
245
12k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building an army of robots
kneath
305
45k
It's Worth the Effort
3n
184
28k
The Invisible Side of Design
smashingmag
299
50k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
Thoughts on Productivity
jonyablonski
69
4.6k
Designing Experiences People Love
moore
142
24k
Agile that works and the tools we love
rasmusluckow
328
21k
Typedesign – Prime Four
hannesfritz
41
2.6k
Fireside Chat
paigeccino
37
3.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.7k
Transcript
SVGΛͬͨ ԁάϥϑͷͭ͘Γํ ʢಈ͔ͳ͍ʣ Contents D3.js CHARTIST.JS SVG stroke @thleap
ͳ͍ͥ·SVGʁ ANIMATED LETTERS ͷσϞΛݟͯҙ͕ࣝߴ·ͬͨ ͍ํΛͬͯɺΘΕํ͕ؾʹͳΔʢΞΠίϯάϥϑ͕΄ͱΜͲʁʣ ͱΓ͋͑ͣάϥϑ࡞ͬͯΈΑ͏
stroke-dasharrayΛͬͯԁάϥϑΛඳ͘ CHARTIST.JSΛͬͯԁάϥϑΛඳ͘ D3.jsΛͬͯԁάϥϑΛඳ͘
stroke-dasharrayΛͬͯԁάϥϑΛඳ͘ <svg viewBox="0 0 63.6619772368 63.6619772368"> <circle class="pie1" cx="31.8309886184" cy="31.8309886184"
r="15.9154943092"/> … </svg> circle { fill: transparent; stroke-width: 31.8309886184; stroke-dasharray: 0,0,0,100; stroke-dashoffset: 25; } .pie1 { stroke: #082C3D; stroke-dasharray: 33,0,0,0; } … DEMO
stroke-dasharrayΛͬͨԁάϥϑ ΈΛ͓֮͑ͯ͘ͷ͕໘ʢجຊతʹԁप / π / 2 Λ͓͚֮͑ͯྑ͍ͱ͍͑…ʣ HTMLͱCSS͚ͩͰࡁΉͷͰ؆୯ ׂ͞ΕͨύΠʹઢӨΛ͚͍ͭͨͱ͖͕໘ ϥϕϧΛ͚ͭͨΓɺΞχϝʔγϣϯͤ͞Α͏ͱ͢Δͱେม
stroke-dasharrayΛͬͯԁάϥϑΛඳ͘ CHARTIST.JSΛͬͯԁάϥϑΛඳ͘ D3.jsΛͬͯԁάϥϑΛඳ͘
None
None
CHARTIST.JSΛͬͯԁάϥϑΛඳ͘ DEMO <div id="demo"></div> .ct-series-a .ct-area, .ct-series-a .ct-slice-pie { fill:
#082C3D; } var data = { labels: ['SVG', 'CHARTIST.JS', 'D3.js'], series: [1, 1, 1] }; var options = { showLabel: true }; new Chartist.Pie('#demo', data, options);
CHARTIST.JSͷ Ұ௨Γͷάϥϑ͕ἧͬͯΔ ϒϨʔΫϙΠϯτ͕ࢦఆՄೳ SMILΞχϝʔγϣϯ͕Ұ෦ͰΘΕ͍ͯΔ ॻ͘ͷָ͕͍͢͝
stroke-dasharrayΛͬͯԁάϥϑΛඳ͘ CHARTIST.JSΛͬͯԁάϥϑΛඳ͘ D3.jsΛͬͯԁάϥϑΛඳ͘
None
D3.jsΛͬͯԁάϥϑΛඳ͘ DEMO <div id="demo"></div> // SVGの表示領域を生成 var svg = d3.select('#demo').append('svg')
.attr('width', svgWidth).attr('height', svgHeight) // SVGの表示領域を生成 var pie = d3.layout.pie() .value(function(d){ return d; }) // 円グラフのサイズを指定 var pie = d3.svg.arc().innerRadius(0).outerRadius(svgWidth / 2); // 円グラフを描画 svg.selectAll('path') .data(pie(list)) .enter() …
D3.jsͷ ར༻ऀ͕ଟ͘ɺυΩϡϝϯτ๛ ଟ࠼ͳදݱ͕Մೳ
ֶͿͱਂΈʹ·Γͦ͏ͳ D3.js ͕ྑͦ͞͏ ·ͱΊ