Charting in your browser with html5 and java script

24
Charting in your browser with HTML5 and JavaScript

Transcript of Charting in your browser with html5 and java script

Page 1: Charting in your browser with html5 and java script

Charting in your browser with HTML5

and JavaScript

Page 2: Charting in your browser with html5 and java script

Who I am

• Maxime Rouiller

• ASP.NET/IIS MVP

• 10 years of experience doing web development

• Freelancer

• Twitter: @MaximRouiller

• Blog: http://blog.decayingcode.com

Page 3: Charting in your browser with html5 and java script

The Plan

• What are the use cases for charts?

• What tools are available today?

• Why do charts in JavaScript rather than [OTHER TECH]?

• What is d3.js?

• Exploring Dimple.js

Page 4: Charting in your browser with html5 and java script

Back to basics: What’s the uses of charts?

• Easily display information

• “An image is worth a 1000 words”

• Understanding what’s going on

Page 5: Charting in your browser with html5 and java script

With or without charts…

Page 6: Charting in your browser with html5 and java script

With or without charts…

Page 7: Charting in your browser with html5 and java script

What kind of tools are available?

• 100% online

• JavaScript libraries (100% HTML)

• SaaS-type of library

• Flash-based tool

Page 8: Charting in your browser with html5 and java script

Flash-Based tools

• I don’t know and I don’t care

• Why? Not mobile friendly, not tablet friendly, only IE6 friendly.

Page 9: Charting in your browser with html5 and java script

Online tool

• RAW by Density Design

• Other $$$ options

Page 10: Charting in your browser with html5 and java script

JavaScript libraries

• Chartist

• DimpleJS

• NVD3

• Rickshaw

• Polychart

• Google Charts

• …

Page 11: Charting in your browser with html5 and java script

JavaScript libraries

• All based on D3.JS

Page 12: Charting in your browser with html5 and java script

What is D3.js

Page 13: Charting in your browser with html5 and java script

What is D3.js

• JavaScript SVG manipulation

• JavaScript CSV/TSV/etc. manipulation

• All around “make data look pretty” kind of tool

Page 14: Charting in your browser with html5 and java script

Example of D3.js

Page 15: Charting in your browser with html5 and java script

Polar Clock

Page 16: Charting in your browser with html5 and java script
Page 18: Charting in your browser with html5 and java script

OK… it’s amazing but… how hard is it?

• 305 lines of JavaScript code for the simplest example

Page 19: Charting in your browser with html5 and java script
Page 20: Charting in your browser with html5 and java script

RELAX!

Page 21: Charting in your browser with html5 and java script
Page 22: Charting in your browser with html5 and java script

DemoBeginning charts with DimpleJS

Page 23: Charting in your browser with html5 and java script

DemoMultiple Data source with DimpleJS

Page 24: Charting in your browser with html5 and java script

Questions?

• Contact me on Twitter: @MaximRouiller

• Blog: http://blog.DecayingCode.com

• Add me to LinkedIn

• www.MaximeRouiller.com

• Or speak to me at the break!