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
170
SVG Graph Animation
グラフアニメーションが作れるライブラリの紹介
namikuguri
July 11, 2016
Tweet
Share
More Decks by namikuguri
See All by namikuguri
実例から学ぶ CSSアニメーション
namikuguri
1
1.3k
かるくCalc()
namikuguri
0
110
SVG Basic
namikuguri
0
150
石
namikuguri
0
75
僕はあの日夕暮れ時に書いたスタイルガイドを忘れない
namikuguri
0
800
誰と作るデザイン?
namikuguri
0
560
CSS の構造化、その目的
namikuguri
0
92
fitme
namikuguri
0
65
About color
namikuguri
0
95
Other Decks in Technology
See All in Technology
今年のRubyKaigiはProfiler Year🤘
osyoyu
0
490
AWSやJAWS-UGとの出会いを振り返る
yoyoyopg
1
160
令和最新版 Ruby プロファイラ "Pf2" のご紹介
osyoyu
0
160
ルーターでプレゼンする
puhitaku
1
3.4k
BPStudyの200回を中心にIT業界を振り返る。そしてこれから
haru860
3
430
【NW X Security JAWS#3】L3-4:AWS環境のIPv6移行に向けて知っておきたいこと
shotashiratori
1
710
中年男性がメインフレームから クラウドへキャリアシフトしてみた
uechishingo
0
390
Microsoft Intune 勉強会 第 2 回目
tamaiyutaro
2
500
DX企業CTOとして考える技術への向き合い方
shoheitai
0
100
Google Cloud Next '24 Recap(Cloud Run/k8s)
mokocm
0
370
高専で制御を、大学でセンシングを学び、次は脳みそ
satoshirobatofujimoto
0
120
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
15
35k
Featured
See All Featured
It's Worth the Effort
3n
180
27k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
The Mythical Team-Month
searls
217
42k
A better future with KSS
kneath
231
16k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
649
58k
In The Pink: A Labor of Love
frogandcode
138
21k
Six Lessons from altMBA
skipperchong
22
3k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Designing for Performance
lara
601
67k
How to Ace a Technical Interview
jacobian
273
22k
Web development in the modern age
philhawksworth
203
10k
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 ͕ྑͦ͞͏ ·ͱΊ