A Quick (but detailed) Overview of D3
Han-Wei Shen Professor, Department of Computer Science and Engineering The Ohio State University
A Quick (but detailed) Overview of D3 Han-Wei Shen Professor, - - PowerPoint PPT Presentation
A Quick (but detailed) Overview of D3 Han-Wei Shen Professor, Department of Computer Science and Engineering The Ohio State University Data Visualization Visualization: To form a mental image of; To make visible. Example:
Han-Wei Shen Professor, Department of Computer Science and Engineering The Ohio State University
map
to increased our memory, thought, and reasoning
_ve_ever_seen
page
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-0/HTML%20-%20Basics.html
Model of the page
Document Root element: <html> Element: <head> Element: <title> Text: "HTML Tutorial" Element: <body> Element: <h1> Text: "HTML Basics" Element: <p> Element <strong> "HTML" "is designed for" Element: <em> "marking up text" "by adding tags such as" Element <code> "<p>" "to create HTML
Element: <p> Element: <strong> “Example image” Element: <img> Attribute: "src" Attribute: "style"
can create dynamic HTML by manipulating the objects:
elements in the page
page
attributes
page
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-0/HTML - DOM.html
x y width: 500px height: 50px
x y
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-0/SVG - Basic Shapes.html
US/docs/Web/SVG/Tutorial/Paths?redirectlocale=en- US&redirectslug=SVG%2FTutorial%2FPaths#Curve_commands
8: l 0 -200 1: M 100 500 (100, 500) (400, 500) 2: H 400 (500, 300) 3: l 100 -200 4: Z 5: m 500 100 (600, 600) (600, 800) 6: l 0 200 7: L 800 800 (800, 800) (800, 600) 9: Z http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-0/SVG - Path.html
(60, 20) (60*2=120, 20*3=60)
Transform in the reverse order, i.e. the order of rotate, translate, and scale
all the elements of an HTML document.
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-DOM/D3 - Selections.html
the specified selector string
the specified selector string
elements
Attributes “r” means radius
marks)
Data values: 20, 40, and 60 http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Data/D3 - Data Binding - A simple exmaple.html
Uniform height: 20px Uniform padding: 10px 20px 40px 60px Data values: 20, 40, and 60
x y
Data values: 20, 40, and 60
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Data/D3 - Data Binding - No bars initially.html
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Data/D3 - Data Binding - No bars initially.html
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Data/D3 - Data Binding - No bars initially.html
element in the selection.
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Data/D3 - Populations of cities.html
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Data/D3 - Populations of cities.html
x y
86.74 pixels
42.93 pixels
22.44 pixels
115.1 pixels
city_population.json
points.csv
the received csv data
form of key: value
points.csv
the keys
array of column names
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Shapes/D3 - Line Generator.html
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Shapes/D3 - Line Generator.html
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Shapes/D3 - Line Generator.html
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Shapes/D3 - Line Generator.html
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Shapes/D3 - Arc generator.html
http://web.cse.ohio-state.edu/~shen.94/5544/D3/D3-Shapes/D3 - Arc - Multiple Arcs.html
Han-Wei Shen’s CSE 5544 Web Site: http://web.cse.ohio-state.edu/~shen.94/5544/