Skip to content

Commit d030eee

Browse files
committed
Checkpoint 4.0 branch.
0 parents  commit d030eee

8 files changed

+373
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.sublime-workspace
2+
.DS_Store
3+
build/
4+
node_modules
5+
npm-debug.log

.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.sublime-*
2+
build/*.zip
3+
test/

LICENSE

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright 2010-2016 Mike Bostock
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
10+
* Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
* Neither the name of the author nor the names of contributors may be used to
15+
endorse or promote products derived from this software without specific prior
16+
written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# d3
2+
3+
This branch contains the prerelease of D3 4.0. This API is unstable and may change at any point prior to the release!
4+
5+
6+
7+
## Installing
8+
9+
If you use NPM, `npm install d3`. Otherwise, download the [latest release](https://github.com/mbostock/d3/releases/latest). The released bundle supports AMD, CommonJS, and vanilla environments. Create a custom build using [Rollup](https://github.com/rollup/rollup) or your preferred bundler. You can also load directly from [d3js.org](https://d3js.org):
10+
11+
```html
12+
<script src="https://d3js.org/d3.v4pre.min.js"></script>
13+
```
14+
15+
## API Reference
16+
17+

d3.sublime-project

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"folders": [
3+
{
4+
"path": ".",
5+
"file_exclude_patterns": [
6+
"*.sublime-workspace"
7+
],
8+
"folder_exclude_patterns": [
9+
"build"
10+
]
11+
}
12+
]
13+
}

index.js

+255
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
export {version} from "./package.json";
2+
3+
import {
4+
bisect,
5+
bisectRight,
6+
bisectLeft,
7+
histogram,
8+
thresholdFreedmanDiaconis,
9+
thresholdScott,
10+
thresholdSturges
11+
} from "d3-array";
12+
13+
bisect.right = bisectRight;
14+
bisect.left = bisectLeft;
15+
16+
histogram.thresholdFreedmanDiaconis = thresholdFreedmanDiaconis;
17+
histogram.thresholdScott = thresholdScott;
18+
histogram.thresholdSturges = thresholdSturges;
19+
20+
export {
21+
bisect,
22+
ascending,
23+
bisector,
24+
descending,
25+
deviation,
26+
entries,
27+
extent,
28+
histogram,
29+
keys,
30+
map,
31+
max,
32+
mean,
33+
median,
34+
merge,
35+
min,
36+
nest,
37+
pairs,
38+
permute,
39+
quantile,
40+
range,
41+
scan,
42+
set,
43+
shuffle,
44+
sum,
45+
ticks,
46+
transpose,
47+
values,
48+
variance,
49+
zip
50+
} from "d3-array";
51+
52+
export {
53+
bisect,
54+
ascending,
55+
bisector,
56+
descending,
57+
deviation,
58+
entries,
59+
extent,
60+
histogram,
61+
keys,
62+
map,
63+
max,
64+
mean,
65+
median,
66+
merge,
67+
min,
68+
nest,
69+
pairs,
70+
permute,
71+
quantile,
72+
range,
73+
scan,
74+
set,
75+
shuffle,
76+
sum,
77+
ticks,
78+
transpose,
79+
values,
80+
variance,
81+
zip
82+
} from "d3-array";
83+
84+
import {
85+
uniform as randomUniform,
86+
normal as randomNormal,
87+
logNormal as randomLogNormal,
88+
bates as randomBates,
89+
irwinHall as randomIrwinHall,
90+
exponential as randomExponential
91+
} from "d3-random";
92+
93+
export var random = {
94+
uniform: randomUniform,
95+
normal: randomNormal,
96+
logNormal: randomLogNormal,
97+
bates: randomBates,
98+
irwinHall: randomIrwinHall,
99+
exponential: randomExponential
100+
};
101+
102+
import {
103+
bind as easeBind,
104+
linearIn,
105+
linearOut,
106+
linearInOut,
107+
quadIn,
108+
quadOut,
109+
quadInOut,
110+
cubicIn,
111+
cubicOut,
112+
cubicInOut,
113+
polyIn,
114+
polyOut,
115+
polyInOut,
116+
sinIn,
117+
sinOut,
118+
sinInOut,
119+
expIn,
120+
expOut,
121+
expInOut,
122+
circleIn,
123+
circleOut,
124+
circleInOut,
125+
bounceIn,
126+
bounceOut,
127+
bounceInOut,
128+
backIn,
129+
backOut,
130+
backInOut,
131+
elasticIn,
132+
elasticOut,
133+
elasticInOut
134+
} from "d3-ease";
135+
136+
export var ease = {
137+
bind: easeBind,
138+
linear: linearIn,
139+
linearIn: linearIn,
140+
linearOut: linearOut,
141+
linearInOut: linearInOut,
142+
quad: quadIn,
143+
quadIn: quadIn,
144+
quadOut: quadOut,
145+
quadInOut: quadInOut,
146+
cubic: cubicIn,
147+
cubicIn: cubicIn,
148+
cubicOut: cubicOut,
149+
cubicInOut: cubicInOut,
150+
poly: polyIn,
151+
polyIn: polyIn,
152+
polyOut: polyOut,
153+
sin: sinIn,
154+
sinIn: sinIn,
155+
sinOut: sinOut,
156+
sinInOut: sinInOut,
157+
exp: expIn,
158+
expIn: expIn,
159+
expOut: expOut,
160+
expInOut: expInOut,
161+
circle: circleIn,
162+
circleIn: circleIn,
163+
circleOut: circleOut,
164+
circleInOut: circleInOut,
165+
bounce: bounceIn,
166+
bounceIn: bounceIn,
167+
bounceOut: bounceOut,
168+
bounceInOut: bounceInOut,
169+
back: backIn,
170+
backIn: backIn,
171+
backOut: backOut,
172+
backInOut: backInOut,
173+
elastic: elasticIn,
174+
elasticIn: elasticIn,
175+
elasticOut: elasticOut,
176+
elasticInOut: elasticInOut
177+
};
178+
179+
export {
180+
path
181+
} from "d3-path";
182+
183+
import {
184+
arc,
185+
area,
186+
line,
187+
pie,
188+
radialArea,
189+
radialLine,
190+
symbol,
191+
symbols,
192+
circle,
193+
cross,
194+
diamond,
195+
square,
196+
star,
197+
triangle,
198+
wye,
199+
basisClosed,
200+
basisOpen,
201+
basis,
202+
bundle,
203+
cardinalClosed,
204+
cardinalOpen,
205+
cardinal,
206+
catmullRomClosed,
207+
catmullRomOpen,
208+
catmullRom,
209+
linearClosed,
210+
linear,
211+
monotone,
212+
natural,
213+
step,
214+
stepAfter,
215+
stepBefore
216+
} from "d3-shape"
217+
218+
area.radial = radialArea;
219+
line.radial = radialLine;
220+
221+
export var shape = {
222+
arc: arc,
223+
area: area,
224+
line: line,
225+
pie: pie,
226+
symbol: symbol,
227+
symbols: symbols,
228+
circle: circle,
229+
cross: cross,
230+
diamond: diamond,
231+
square: square,
232+
star: star,
233+
triangle: triangle,
234+
wye: wye
235+
};
236+
237+
export var curve = {
238+
basisClosed: basisClosed,
239+
basisOpen: basisOpen,
240+
basis: basis,
241+
bundle: bundle,
242+
cardinalClosed: cardinalClosed,
243+
cardinalOpen: cardinalOpen,
244+
cardinal: cardinal,
245+
catmullRomClosed: catmullRomClosed,
246+
catmullRomOpen: catmullRomOpen,
247+
catmullRom: catmullRom,
248+
linearClosed: linearClosed,
249+
linear: linear,
250+
monotone: monotone,
251+
natural: natural,
252+
step: step,
253+
stepAfter: stepAfter,
254+
stepBefore: stepBefore
255+
};

package.json

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "d3",
3+
"version": "4.0.0pre",
4+
"description": "Data-Driven Documents",
5+
"keywords": [
6+
"dom",
7+
"visualization",
8+
"svg",
9+
"animation",
10+
"canvas"
11+
],
12+
"homepage": "https://github.com/mbostock/d3",
13+
"license": "BSD-3-Clause",
14+
"author": {
15+
"name": "Mike Bostock",
16+
"url": "http://bost.ocks.org/mike"
17+
},
18+
"main": "build/d3.js",
19+
"jsnext:main": "index",
20+
"repository": {
21+
"type": "git",
22+
"url": "https://github.com/mbostock/d3.git"
23+
},
24+
"scripts": {
25+
"pretest": "mkdir -p build && rollup -c -o build/d3.js -- index.js",
26+
"test": "faucet `find test -name '*-test.js'`",
27+
"prepublish": "npm run test && uglifyjs build/d3.js -c -m -o build/d3.min.js && rm -f build/d3.zip && zip -j build/d3.zip -- LICENSE README.md build/d3.js build/d3.min.js"
28+
},
29+
"devDependencies": {
30+
"faucet": "0.0",
31+
"rollup": "0.23",
32+
"rollup-plugin-json": "2",
33+
"rollup-plugin-npm": "1",
34+
"tape": "4",
35+
"uglify-js": "2"
36+
},
37+
"dependencies": {
38+
"d3-array": "0.6.2",
39+
"d3-ease": "0.3.1",
40+
"d3-path": "0.1.3",
41+
"d3-random": "0.1.1",
42+
"d3-shape": "0.3.0"
43+
}
44+
}

rollup.config.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import json from "rollup-plugin-json";
2+
import npm from "rollup-plugin-npm";
3+
4+
export default {
5+
plugins: [npm({jsnext: true}), json()],
6+
moduleId: "d3",
7+
moduleName: "d3",
8+
format: "umd"
9+
};

0 commit comments

Comments
 (0)