Commit f8ae20d
committed
Simplify data join. Add insert & empty.
The data join is now specified as a single function of data, as with all other
properties. This allows the key to be computed on the previously-bound data,
rather than requiring the key to be serialized into the DOM (say, as an
attribute). In the case that there is no previously-bound data, it is still
possible to access the associated node as the `this` context.
The `enter` operator no longer performs an append. For symmetry with the `exit`
operator, you must call `append` after obtaining the entering selection. This
requires a tiny bit more code, but should make the code more clear. Also, it
provides an opportunity to use a different instantiation operator, such as the
new `insert` operator. This takes a second argument, which is a selector for the
insert-before reference element. For example, the selector ":first-child" will
prepend nodes.
The `empty` operator allows you to query whether a selection is empty (i.e.,
contains zero matching nodes).1 parent 44e67e2 commit f8ae20d
42 files changed
Lines changed: 291 additions & 252 deletions
File tree
- examples
- albers
- area
- bar
- calendar
- chord
- choropleth
- contour
- delaunay
- donut
- dot
- force
- hello-world
- horizon
- hull
- line
- mercator
- moire
- pie
- quadtree
- splom
- stream
- symbol-map
- voronoi
- src/core
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | 938 | | |
942 | 939 | | |
943 | 940 | | |
| |||
1016 | 1013 | | |
1017 | 1014 | | |
1018 | 1015 | | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
| 1016 | + | |
1023 | 1017 | | |
1024 | 1018 | | |
1025 | 1019 | | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | | - | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
1037 | 1020 | | |
1038 | 1021 | | |
1039 | 1022 | | |
| |||
1046 | 1029 | | |
1047 | 1030 | | |
1048 | 1031 | | |
1049 | | - | |
1050 | | - | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
1051 | 1045 | | |
1052 | 1046 | | |
1053 | 1047 | | |
| |||
1058 | 1052 | | |
1059 | 1053 | | |
1060 | 1054 | | |
1061 | | - | |
| 1055 | + | |
1062 | 1056 | | |
1063 | 1057 | | |
1064 | 1058 | | |
| |||
1068 | 1062 | | |
1069 | 1063 | | |
1070 | 1064 | | |
1071 | | - | |
| 1065 | + | |
1072 | 1066 | | |
1073 | 1067 | | |
1074 | 1068 | | |
1075 | 1069 | | |
1076 | 1070 | | |
1077 | | - | |
| 1071 | + | |
1078 | 1072 | | |
1079 | 1073 | | |
1080 | 1074 | | |
| |||
1094 | 1088 | | |
1095 | 1089 | | |
1096 | 1090 | | |
1097 | | - | |
| 1091 | + | |
1098 | 1092 | | |
1099 | 1093 | | |
1100 | 1094 | | |
1101 | 1095 | | |
1102 | | - | |
| 1096 | + | |
1103 | 1097 | | |
1104 | 1098 | | |
1105 | 1099 | | |
| |||
1123 | 1117 | | |
1124 | 1118 | | |
1125 | 1119 | | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1126 | 1123 | | |
1127 | 1124 | | |
1128 | 1125 | | |
| |||
1134 | 1131 | | |
1135 | 1132 | | |
1136 | 1133 | | |
1137 | | - | |
1138 | | - | |
| 1134 | + | |
| 1135 | + | |
1139 | 1136 | | |
1140 | 1137 | | |
1141 | 1138 | | |
| |||
1167 | 1164 | | |
1168 | 1165 | | |
1169 | 1166 | | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
1170 | 1171 | | |
1171 | 1172 | | |
1172 | 1173 | | |
| |||
1394 | 1395 | | |
1395 | 1396 | | |
1396 | 1397 | | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
1397 | 1419 | | |
1398 | 1420 | | |
1399 | 1421 | | |
| |||
1448 | 1470 | | |
1449 | 1471 | | |
1450 | 1472 | | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | 1473 | | |
1460 | 1474 | | |
1461 | 1475 | | |
| |||
0 commit comments