You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-29Lines changed: 39 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ This is a short interactive tutorial introducing the basic elements and concepts
5
5
Then, the basic principles of D3 and its functions are introduced by incrementally implementing an interactive bar chart.
6
6
The example can be implemented manually or directly by editing the [CodePen](https://codepen.io) examples.
7
7
8
-
In the second part of this tutorial a more complex multiple coordinated view (MCV) setup is incrementally implemented. A multiple coordinated view setup consists of multiple visualizations that are interactivly linked together such
8
+
In the second part of this tutorial a more complex multiple coordinated view (MCV) setup is incrementally implemented. A multiple coordinated view setup consists of multiple visualizations that are interactively linked together such
9
9
as selecting an element in one visualization filters the data in a second one. This is also called linking and brushing. Along with this example some guidelines
10
10
regarding code structure and advanced D3 transitions are given.
11
11
@@ -63,7 +63,7 @@ Part 2: Student's First Multiple Coordinated View
63
63
-[Code Structure](#code-structure)
64
64
-[D3 Layouts](#layouts)
65
65
-[Interactivity 2](#interaction2)
66
-
-[Reuseability](#reuse)
66
+
-[Reusability](#reuse)
67
67
-[Transitions 2](#transitions2)
68
68
69
69
Extras
@@ -196,7 +196,7 @@ More important than styling, however, are the rules on how we identify elements
196
196
197
197
## Selectors
198
198
199
-
Great way to spearate the style from the actual content. In addition, the selector notation is used for navigation and selections in D3.
199
+
Great way to separate the style from the actual content. In addition, the selector notation is used for navigation and selections in D3.
200
200
201
201
Good overview of CSS Selectors: https://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048
202
202
@@ -329,7 +329,7 @@ JavaScript can be used with imperative/procedural, object-oriented, and function
329
329
330
330
It is a dynamically typed language, which can be strange for developers who mainly work with strongly typed languages such as C/C++ and Java.
331
331
332
-
**Note** To follow the examples below, you can open the Developer Tools’s JavaScript console on a browser window, and type the examples to see what they do. Or
332
+
**Note** To follow the examples below, you can open the JavaScript console on a browser window, and type the examples to see what they do. Or
333
333
[![Open in CodePen][codepen]](https://codepen.io/thinkh/pen/qrwxdb).
334
334
335
335
```js
@@ -904,7 +904,7 @@ Besides this functional approach an object oriented way is an valid alternative.
904
904
905
905
**INTERACTIVE**
906
906
907
-
MCV Inital Setup: [mcv01_initial.html](examples/mcv01_initial.html)[![Open in CodePen][codepen]](https://codepen.io/sgratzl/pen/bQzNBO)
907
+
MCV Initial Setup: [mcv01_initial.html](examples/mcv01_initial.html)[![Open in CodePen][codepen]](https://codepen.io/sgratzl/pen/bQzNBO)
908
908
909
909
---
910
910
@@ -940,9 +940,9 @@ SEE: [miserables.html](examples/miserables.html) [![Open in CodePen][codepen]](h
940
940
941
941
### D3 Geo
942
942
943
-
D3 Geo is the D3 package for creating maps and other geo location based visualization. Similar to the other layouts D3 only helps to create the data structure and transformations but one has to render the map itself using SVG path elements. D3 provides numerous different geo projection methods, commonly used are `d3.geoAlbersUsa` and `d3.geoMercator`. A `d3.geoPath` uses a geo projection to transform geographical shape data in [GeoJSON](http://geojson.org/) or its derivative [TopoJSON](https://github.com/topojson/topojson) to SVG Path descriptions.
943
+
D3 Geo is the D3 package for creating maps and other geo location based visualization. Similar to the other layouts D3 only helps to create the data structure and transformations but one has to render the map itself using SVG path elements. D3 provides numerous different geo projection methods, commonly used are `d3.geoAlbersUsa` and `d3.geoMercator`. A `d3.geoPath` uses a geo projection to transform geographical shape data in [GeoJSON](http://geojson.org/) or its derivative [TopoJSON](https://github.com/topojson/topojson) to SVG Path descriptions.
944
944
945
-
For example using `d3.geoAlbersUsa` and the [US Atlas](https://github.com/topojson/us-atlas) shape data one can create a simple Choropleth chart in which each US state is encoded using a continuous colored value.
945
+
For example using `d3.geoAlbersUsa` and the [US Atlas](https://github.com/topojson/us-atlas) shape data one can create a simple Choropleth chart in which each US state is encoded using a continuous colored value.
An advantage of our code structure is that we can use the factory methods to create multiple instances of the same visualization kind showing different aspect of the data. This is a simple yet effective way to improve the overall multiple coordinated setup.
The big player for commercial fat client data visualization.
1061
+
The big player for commercial data visualization.
1062
1062
1063
-

1063
+

1064
1064
1065
-
(c) https://www.marketwatch.ro
1065
+
(c) https://docs.microsoft.com
1066
1066
1067
-
## Processing
1067
+
## Tableau
1068
1068
1069
-
https://processing.org/ and https://processingjs.org/ for a web-version
1069
+
https://www.tableau.com/
1070
1070
1071
-
Own programming language for visualizations with OpenGL backend
1071
+
Another big player for commercial data visualization.
1072
1072
1073
-

1073
+

1074
1074
1075
-
## HighCharts
1075
+
(c) https://www.marketwatch.ro
1076
1076
1077
-
https://www.highcharts.com/
1077
+
## Plot.ly
1078
1078
1079
-
Commercial JavaScript Plot library
1079
+
https://plot.ly
1080
1080
1081
-

1081
+
free and commercial charting library.
1082
1082
1083
-
(c) https://www.webdesignbooth.com
1083
+

1084
+
1085
+
(c) https://aperiodical.com/
1084
1086
1085
1087
## Chart.js
1086
1088
@@ -1090,15 +1092,23 @@ Open source canvas based charting library
1090
1092
1091
1093

1092
1094
1093
-
## Plot.ly
1095
+
## Processing
1094
1096
1095
-
https://plot.ly
1097
+
https://processing.org/ and https://processingjs.org/ for a web-version
1096
1098
1097
-
free and commerical charting library.
1099
+
Own programming language for visualizations with OpenGL backend
1098
1100
1099
-

1101
+

1100
1102
1101
-
(c) https://aperiodical.com/
1103
+
## HighCharts
1104
+
1105
+
https://www.highcharts.com/
1106
+
1107
+
Commercial JavaScript Plot library
1108
+
1109
+

1110
+
1111
+
(c) https://www.webdesignbooth.com
1102
1112
1103
1113
## Frameworks on top of D3:
1104
1114
@@ -1114,7 +1124,7 @@ free and commerical charting library.
1114
1124
1115
1125
## TypeScript and D3
1116
1126
1117
-
[TypeScript](https://www.typescriptlang.org/) is a programming language on top of JavaScript. Foremost it allows to specify types to variables and parameters similar to other typed langugages such as Java, C#, and so on. The TypeScript compiler compiles the TypeScript code to regular JavaScript code and also performs checks on it. Every JavaScript code is valid TypeScript code.
1127
+
[TypeScript](https://www.typescriptlang.org/) is a programming language on top of JavaScript. Foremost it allows to specify types to variables and parameters similar to other typed languages such as Java, C#, and so on. The TypeScript compiler compiles the TypeScript code to regular JavaScript code and also performs checks on it. Every JavaScript code is valid TypeScript code.
1118
1128
1119
1129
Examples
1120
1130
@@ -1181,7 +1191,7 @@ let rects: Selection<SVGRectElement, number, SVGGElement, unknown>;
One can specify the type in more detail by specifing the generic argument of the function. This is useful when the selector is more complex that just the element type. e.g., `d3.select<SVGGElement, unknown>(".chart")`. One also has to specify the generic arguments when using scales that are not just numbers but e.g., a linear scale for generating colors as `d3.scaleLinear<string, number>().domain([0, 1]).range(["white", "black"]);`.
1194
+
One can specify the type in more detail by specifying the generic argument of the function. This is useful when the selector is more complex that just the element type. e.g., `d3.select<SVGGElement, unknown>(".chart")`. One also has to specify the generic arguments when using scales that are not just numbers but e.g., a linear scale for generating colors as `d3.scaleLinear<string, number>().domain([0, 1]).range(["white", "black"]);`.
0 commit comments