D3 Tutorial
Introduction of Basic Components: HTML, CSS, SVG, and JavaScript D3.js Setup
Edit by Jiayi Xu and Han-Wei Shen, The Ohio State University
D3 Tutorial Introduction of Basic Components: HTML, CSS, SVG, and - - PowerPoint PPT Presentation
D3 Tutorial Introduction of Basic Components: HTML, CSS, SVG, and JavaScript D3.js Setup Edit by Jiayi Xu and Han-Wei Shen, The Ohio State University HTML - H yper T ext M arkup L anguage HTML is the standard markup language for creating Web
Introduction of Basic Components: HTML, CSS, SVG, and JavaScript D3.js Setup
Edit by Jiayi Xu and Han-Wei Shen, The Ohio State University
page
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
40px 60px
15px 20px
dotted dashed
15px 20px
x y width: 500px height: 50px
x y
(0, 48) (48, 16) (16, 96) (96, 48) (80, 96) (05, 130) x y
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
(60, 20) (60*2=120, 20*3=60)
Transform in the reverse order, i.e. the order of rotate, translate, and scale
appear to be "in front"
undefined
is 4
undefined
execute the function
values (Objects)
for (var i=0; i < 10; i++) {
if (condition) {
statement_1_runs_if_condition_is_true(); break;
} else {
statement_2_runs_if_condition_is_false(); continue;
}
}
all the elements of an HTML document.
loading local files via JavaScript, for security reasons
state.edu/~shen.94/5544/