Skip to content

Commit 74cbded

Browse files
committed
Merge remote-tracking branch 'origin/master' into plot-schema-script
2 parents 0b3ae0d + 7374eb8 commit 74cbded

34 files changed

+21532
-8074
lines changed

.circleci/config.yml

Lines changed: 12 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,8 @@ jobs:
1515
steps:
1616
- checkout
1717
- run:
18-
name: set heap option before very first node.js call
19-
command: |
20-
export NODE_OPTIONS='--max-old-space-size=4096'
21-
- run:
22-
name: Install dependencies
23-
command: |
24-
npm ci
25-
- run:
26-
name: List dependency versions
27-
command: |
28-
echo "npm: $(npm --version)"
29-
echo "node: $(node --version)"
30-
npm ls || true
18+
name: set up build environment
19+
command: .circleci/env_build.sh
3120
- run:
3221
name: Pretest
3322
command: |
@@ -87,31 +76,8 @@ jobs:
8776
- attach_workspace:
8877
at: ~/
8978
- run:
90-
name: which pip3 version
91-
command: which pip3 && pip3 --version
92-
- run:
93-
name: install kaleido v0.2.1
94-
command: python3 -m pip install kaleido==0.2.1
95-
- run:
96-
name: install plotly.io v5.0.0
97-
command: python3 -m pip install plotly==5.0.0
98-
- run:
99-
name: install liberation2 fonts
100-
command: sudo apt-get install fonts-liberation2
101-
- run:
102-
name: install OpenSans fonts
103-
command: sudo apt-get install fonts-open-sans
104-
- run:
105-
name: install NotoSansCJK fonts
106-
command: sudo apt install fonts-noto-cjk
107-
- run:
108-
name: download google fonts e.g. Dosis, GravitasOne, NotoSansMono, NotoSans, NotoSerif, Old_Standard_TT, PT_Sans_Narrow, Raleway and Roboto
109-
command: python3 .circleci/download_google_fonts.py
110-
- run:
111-
name: install downloaded google fonts
112-
command: |
113-
sudo cp -r .circleci/fonts/ /usr/share/
114-
sudo fc-cache -f
79+
name: install kaleido, plotly.io and required fonts
80+
command: .circleci/env_image.sh
11581
- run:
11682
name: create all png files
11783
command: .circleci/test.sh make-baselines
@@ -142,14 +108,8 @@ jobs:
142108
- attach_workspace:
143109
at: ~/
144110
- run:
145-
name: which pip3 version
146-
command: which pip3 && pip3 --version
147-
- run:
148-
name: install kaleido v0.2.1
149-
command: python3 -m pip install kaleido==0.2.1
150-
- run:
151-
name: install plotly.io v5.0.0
152-
command: python3 -m pip install plotly==5.0.0
111+
name: install kaleido, plotly.io and required fonts
112+
command: .circleci/env_image.sh
153113
- run:
154114
name: install poppler-utils to have pdftops for exporting eps
155115
command: sudo apt-get install poppler-utils
@@ -217,8 +177,10 @@ jobs:
217177
- image: circleci/node:12.22.1
218178
working_directory: ~/plotly.js
219179
steps:
220-
- attach_workspace:
221-
at: ~/
180+
- checkout
181+
- run:
182+
name: set up build environment
183+
command: .circleci/env_build.sh
222184
- run:
223185
name: Build dist/
224186
command: npm run build
@@ -245,18 +207,6 @@ jobs:
245207
- run:
246208
name: Test plot-schema.json diff - If failed, after (npm start) you could run (npm run schema && git add test/plot-schema.json && git commit -m "update plot-schema diff")
247209
command: diff --unified --color dist/plot-schema.json test/plot-schema.json
248-
- persist_to_workspace:
249-
root: ~/
250-
paths:
251-
- plotly.js
252-
253-
test-dist1:
254-
docker:
255-
- image: circleci/node:12.22.1
256-
working_directory: ~/plotly.js
257-
steps:
258-
- attach_workspace:
259-
at: ~/
260210
- run:
261211
name: Test plotly.min.js import using requirejs
262212
command: npm run test-requirejs
@@ -266,20 +216,9 @@ jobs:
266216
- run:
267217
name: Test certain bundles against function constructors
268218
command: npm run no-new-func
269-
270-
test-dist2:
271-
docker:
272-
- image: circleci/node:12.22.1
273-
working_directory: ~/plotly.js
274-
steps:
275-
- attach_workspace:
276-
at: ~/
277219
- run:
278220
name: Test plotly bundles against es6
279221
command: npm run no-es6-dist
280-
- run:
281-
name: Test plotly bundles againt duplicate keys
282-
command: npm run no-dup-keys
283222

284223
workflows:
285224
version: 2
@@ -316,12 +255,5 @@ workflows:
316255
- source-syntax:
317256
requires:
318257
- install-and-cibuild
319-
- publish-dist:
320-
requires:
321-
- install-and-cibuild
322-
- test-dist1:
323-
requires:
324-
- publish-dist
325-
- test-dist2:
326-
requires:
327-
- publish-dist
258+
259+
- publish-dist

.circleci/env_build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
export NODE_OPTIONS='--max-old-space-size=4096' && \
3+
echo "node version: $(node --version)" && \
4+
echo "npm version: $(npm --version)" && \
5+
npm ci && \
6+
npm ls || true

.circleci/env_image.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji && \
3+
sudo python3 .circleci/download_google_fonts.py && \
4+
sudo cp -r .circleci/fonts/ /usr/share/ && \
5+
sudo fc-cache -f && \
6+
sudo python3 -m pip install kaleido==0.2.1 plotly==5.1.0 --progress-bar off

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@ To see all merged commits on the master branch that will be part of the next plo
99

1010
where X.Y.Z is the semver of most recent plotly.js release.
1111

12+
## [2.2.0] -- 2021-06-28
13+
14+
### Added
15+
- Legend group titles [[#5752](https://github.com/plotly/plotly.js/pull/5752)],
16+
this feature was anonymously sponsored: thank you to our sponsor!
17+
- Add half-year directive (%h) for formatting dates and improve descriptions to include extra date formatting options [[#5762](https://github.com/plotly/plotly.js/pull/5762)],
18+
this feature was anonymously sponsored: thank you to our sponsor!
19+
20+
### Changed
21+
- Modernize the process of creating baselines using [Kaleido](https://github.com/plotly/Kaleido) and improve image & other export test systems [[#5724](https://github.com/plotly/plotly.js/pull/5724)]
22+
- Centralize jsdom utility to return Plotly object in node.js test scripts and use it in generating plot-schema [[#5755](https://github.com/plotly/plotly.js/pull/5755)]
23+
- Bump turf bbox dependency to v6.4.0 [[#5747](https://github.com/plotly/plotly.js/pull/5747)]
24+
- Bump turf area dependency to v6.4.0 [[#5748](https://github.com/plotly/plotly.js/pull/5748)]
25+
26+
### Fixed
27+
- Cache values and patterns in set_convert for axes with `rangebreaks` to improve performance [[#5659](https://github.com/plotly/plotly.js/pull/5659)],
28+
with thanks to @spasovski for the contribution!
29+
- Fix fetching geojson when ES6 import is used to load the library [[#5763](https://github.com/plotly/plotly.js/pull/5763)]
30+
- Correct readme links [[#5746](https://github.com/plotly/plotly.js/pull/5746)]
31+
32+
1233
## [2.1.0] -- 2021-06-18
1334

1435
### Added

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
5555
5656
```html
5757
<head>
58-
<script src="https://cdn.plot.ly/plotly-2.1.0.min.js"></script>
58+
<script src="https://cdn.plot.ly/plotly-2.2.0.min.js"></script>
5959
</head>
6060
<body>
6161
<div id="gd"></div>
@@ -71,8 +71,8 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
7171

7272
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
7373
```html
74-
<script>
75-
import "https://cdn.plot.ly/plotly-2.1.0.min.js"
74+
<script type="module">
75+
import "https://cdn.plot.ly/plotly-2.2.0.min.js"
7676
Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
7777
</script>
7878
```
@@ -82,7 +82,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
8282
### Un-minified versions are also available on CDN
8383
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
8484
```html
85-
<script src="https://cdn.plot.ly/plotly-2.1.0.js" charset="utf-8"></script>
85+
<script src="https://cdn.plot.ly/plotly-2.2.0.js" charset="utf-8"></script>
8686
```
8787

8888
> Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.4. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.

dist/README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ The main plotly.js bundles weight in at:
4343

4444
| plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js |
4545
|-----------|---------------|----------------------|---------------------|
46-
| 7.9 MB | 3.4 MB | 1018.4 kB | 8.2 MB |
46+
| 8 MB | 3.4 MB | 1019.6 kB | 8.3 MB |
4747

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-2.1.0.js
49+
> https://cdn.plot.ly/plotly-2.2.0.js
5050
51-
> https://cdn.plot.ly/plotly-2.1.0.min.js
51+
> https://cdn.plot.ly/plotly-2.2.0.min.js
5252
5353

5454
#### npm packages
@@ -91,12 +91,12 @@ The `basic` partial bundle contains trace modules `bar`, `pie` and `scatter`.
9191

9292
| Raw size | Minified size | Minified + gzip size |
9393
|------|-----------------|------------------------|
94-
| 2.7 MB | 1005.5 kB | 326.5 kB |
94+
| 2.7 MB | 1007.3 kB | 327.3 kB |
9595

9696
#### CDN links
97-
> https://cdn.plot.ly/plotly-basic-2.1.0.js
97+
> https://cdn.plot.ly/plotly-basic-2.2.0.js
9898
99-
> https://cdn.plot.ly/plotly-basic-2.1.0.min.js
99+
> https://cdn.plot.ly/plotly-basic-2.2.0.min.js
100100
101101

102102
#### npm packages
@@ -114,12 +114,12 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
114114

115115
| Raw size | Minified size | Minified + gzip size |
116116
|------|-----------------|------------------------|
117-
| 3.3 MB | 1.2 MB | 397.9 kB |
117+
| 3.3 MB | 1.2 MB | 398.7 kB |
118118

119119
#### CDN links
120-
> https://cdn.plot.ly/plotly-cartesian-2.1.0.js
120+
> https://cdn.plot.ly/plotly-cartesian-2.2.0.js
121121
122-
> https://cdn.plot.ly/plotly-cartesian-2.1.0.min.js
122+
> https://cdn.plot.ly/plotly-cartesian-2.2.0.min.js
123123
124124

125125
#### npm packages
@@ -137,12 +137,12 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
137137

138138
| Raw size | Minified size | Minified + gzip size |
139139
|------|-----------------|------------------------|
140-
| 2.8 MB | 1 MB | 336.2 kB |
140+
| 2.9 MB | 1 MB | 337.3 kB |
141141

142142
#### CDN links
143-
> https://cdn.plot.ly/plotly-geo-2.1.0.js
143+
> https://cdn.plot.ly/plotly-geo-2.2.0.js
144144
145-
> https://cdn.plot.ly/plotly-geo-2.1.0.min.js
145+
> https://cdn.plot.ly/plotly-geo-2.2.0.min.js
146146
147147

148148
#### npm packages
@@ -160,12 +160,12 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
160160

161161
| Raw size | Minified size | Minified + gzip size |
162162
|------|-----------------|------------------------|
163-
| 3.8 MB | 1.5 MB | 481.9 kB |
163+
| 3.8 MB | 1.5 MB | 482.7 kB |
164164

165165
#### CDN links
166-
> https://cdn.plot.ly/plotly-gl3d-2.1.0.js
166+
> https://cdn.plot.ly/plotly-gl3d-2.2.0.js
167167
168-
> https://cdn.plot.ly/plotly-gl3d-2.1.0.min.js
168+
> https://cdn.plot.ly/plotly-gl3d-2.2.0.min.js
169169
170170

171171
#### npm packages
@@ -183,12 +183,12 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
183183

184184
| Raw size | Minified size | Minified + gzip size |
185185
|------|-----------------|------------------------|
186-
| 3.8 MB | 1.5 MB | 502.3 kB |
186+
| 3.8 MB | 1.5 MB | 503.1 kB |
187187

188188
#### CDN links
189-
> https://cdn.plot.ly/plotly-gl2d-2.1.0.js
189+
> https://cdn.plot.ly/plotly-gl2d-2.2.0.js
190190
191-
> https://cdn.plot.ly/plotly-gl2d-2.1.0.min.js
191+
> https://cdn.plot.ly/plotly-gl2d-2.2.0.min.js
192192
193193

194194
#### npm packages
@@ -206,12 +206,12 @@ The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitym
206206

207207
| Raw size | Minified size | Minified + gzip size |
208208
|------|-----------------|------------------------|
209-
| 4.3 MB | 1.7 MB | 523.9 kB |
209+
| 4.4 MB | 1.8 MB | 525 kB |
210210

211211
#### CDN links
212-
> https://cdn.plot.ly/plotly-mapbox-2.1.0.js
212+
> https://cdn.plot.ly/plotly-mapbox-2.2.0.js
213213
214-
> https://cdn.plot.ly/plotly-mapbox-2.1.0.min.js
214+
> https://cdn.plot.ly/plotly-mapbox-2.2.0.min.js
215215
216216

217217
#### npm packages
@@ -229,12 +229,12 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
229229

230230
| Raw size | Minified size | Minified + gzip size |
231231
|------|-----------------|------------------------|
232-
| 3 MB | 1.1 MB | 352.7 kB |
232+
| 3 MB | 1.1 MB | 353.5 kB |
233233

234234
#### CDN links
235-
> https://cdn.plot.ly/plotly-finance-2.1.0.js
235+
> https://cdn.plot.ly/plotly-finance-2.2.0.js
236236
237-
> https://cdn.plot.ly/plotly-finance-2.1.0.min.js
237+
> https://cdn.plot.ly/plotly-finance-2.2.0.min.js
238238
239239

240240
#### npm packages
@@ -252,12 +252,12 @@ The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `ca
252252

253253
| Raw size | Minified size | Minified + gzip size |
254254
|------|-----------------|------------------------|
255-
| 6.7 MB | 2.8 MB | 839.2 kB |
255+
| 6.7 MB | 2.8 MB | 840.4 kB |
256256

257257
#### CDN links
258-
> https://cdn.plot.ly/plotly-strict-2.1.0.js
258+
> https://cdn.plot.ly/plotly-strict-2.2.0.js
259259
260-
> https://cdn.plot.ly/plotly-strict-2.1.0.min.js
260+
> https://cdn.plot.ly/plotly-strict-2.2.0.min.js
261261
262262

263263
#### npm packages

0 commit comments

Comments
 (0)