Skip to content

Commit 4476d38

Browse files
committed
Merge branch 'master' into pikul-proportional-ticks
2 parents 99d336a + 9664ca9 commit 4476d38

File tree

109 files changed

+271374
-267690
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+271374
-267690
lines changed

.circleci/config.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,25 @@ jobs:
292292
paths:
293293
- plotly.js
294294

295+
make-baselines-b64:
296+
parallelism: 4
297+
docker:
298+
- image: circleci/python:3.8.9
299+
working_directory: ~/plotly.js
300+
steps:
301+
- attach_workspace:
302+
at: ~/
303+
- run:
304+
name: Install kaleido, plotly.io and required fonts
305+
command: .circleci/env_image.sh
306+
- run:
307+
name: Create all png files
308+
command: .circleci/test.sh make-baselines-b64
309+
- persist_to_workspace:
310+
root: ~/
311+
paths:
312+
- plotly.js
313+
295314
test-baselines:
296315
docker:
297316
- image: circleci/node:16.9.0
@@ -320,6 +339,20 @@ jobs:
320339
path: build
321340
destination: /
322341

342+
test-baselines-b64:
343+
docker:
344+
- image: circleci/node:16.9.0
345+
working_directory: ~/plotly.js
346+
steps:
347+
- attach_workspace:
348+
at: ~/
349+
- run:
350+
name: Compare pixels
351+
command: .circleci/test.sh test-image ; find build -maxdepth 1 -type f -delete
352+
- store_artifacts:
353+
path: build
354+
destination: /
355+
323356
test-baselines-mathjax3:
324357
docker:
325358
- image: circleci/node:16.9.0
@@ -512,6 +545,12 @@ workflows:
512545
- test-baselines-mathjax3:
513546
requires:
514547
- make-baselines-mathjax3
548+
- make-baselines-b64:
549+
requires:
550+
- install-and-cibuild
551+
- test-baselines-b64:
552+
requires:
553+
- make-baselines-b64
515554
- make-baselines:
516555
requires:
517556
- install-and-cibuild

.circleci/env_image.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ sudo cp -r .circleci/fonts/ /usr/share/ && \
66
sudo fc-cache -f && \
77
# install kaleido & plotly
88
sudo python3 -m pip install kaleido==0.2.1 plotly==5.5.0 --progress-bar off
9+
# install numpy i.e. to convert arrays to typed arrays
10+
sudo python3 -m pip install numpy==1.24.2

.circleci/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ case $1 in
106106
exit $EXIT_STATE
107107
;;
108108

109+
make-baselines-b64)
110+
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split)
111+
python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$?
112+
exit $EXIT_STATE
113+
;;
114+
109115
make-baselines)
110116
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split)
111117
python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$?

.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
"Float32Array": true,
1515
"Float64Array": true,
1616
"Uint8Array": true,
17+
"Int8Array": true,
18+
"Uint8ClampedArray": true,
1719
"Int16Array": true,
20+
"Uint16Array": true,
1821
"Int32Array": true,
22+
"Uint32Array": true,
1923
"ArrayBuffer": true,
2024
"DataView": true,
2125
"SVGElement": false

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,30 @@ 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.28.0] -- 2024-01-05
13+
14+
### Added
15+
- Add `align` option to sankey nodes to control horizontal alignment [[#6800](https://github.com/plotly/plotly.js/pull/6800)],
16+
with thanks to @adamreeve for the contribution!
17+
- Add the possibility of loading "virtual-webgl" script for WebGL 1 to help display several WebGL contexts on a page [[#6784](https://github.com/plotly/plotly.js/pull/6784)], with thanks to @greggman for the contribution!
18+
- Add options to use base64 encoding (`bdata`) and `shape` (for 2 dimensional arrays) to declare various typed arrays i.e. `dtype=(float64|float32|int32|int16|int8|uint32|uint16|uint8)` [[#5230](https://github.com/plotly/plotly.js/pull/5230)]
19+
20+
### Fixed
21+
- Fix scattergl rendering bug on M1 mac devices [[#6830](https://github.com/plotly/plotly.js/pull/6830)],
22+
with thanks to @justinjhendrick for the contribution!
23+
- Fix hovering over sankey node only fully highlights first trace [[#6799](https://github.com/plotly/plotly.js/pull/6799)],
24+
with thanks to @DominicWuest for the contribution!
25+
- Fix error when the mouse moves to x=0 while dragging a rangeslider [[#6780](https://github.com/plotly/plotly.js/pull/6780)],
26+
with thanks to @david-bezero for the contribution!
27+
- Fix duplicated of major and minor ticks in calc data [[#6829](https://github.com/plotly/plotly.js/pull/6829)],
28+
with thanks to @ayjayt for the contribution!
29+
- Fix charset test dashboard [[#6826](https://github.com/plotly/plotly.js/pull/6826)],
30+
with thanks to @ayjayt for the contribution!
31+
- Fix range defaults to take into account `minallowed` and `maxallowed` values of the axis [[#6796](https://github.com/plotly/plotly.js/pull/6796)]
32+
- Fix `scattergl` legend when `marker.angle` is an array [[#6787](https://github.com/plotly/plotly.js/pull/6787)]
33+
- Fix plot schema not to show `line.shape` options for `scatterpolargl` trace [[#6781](https://github.com/plotly/plotly.js/pull/6781)]
34+
35+
1236
## [2.27.1] -- 2023-11-08
1337

1438
### Changed

README.md

Lines changed: 8 additions & 3 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.27.1.min.js" charset="utf-8"></script>
58+
<script src="https://cdn.plot.ly/plotly-2.28.0.min.js" charset="utf-8"></script>
5959
</head>
6060
<body>
6161
<div id="gd"></div>
@@ -72,7 +72,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
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
7474
<script type="module">
75-
import "https://cdn.plot.ly/plotly-2.27.1.min.js"
75+
import "https://cdn.plot.ly/plotly-2.28.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.27.1.js" charset="utf-8"></script>
85+
<script src="https://cdn.plot.ly/plotly-2.28.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.5. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.
@@ -100,6 +100,11 @@ You could load either version two or version three of MathJax files, for example
100100
> When using MathJax version 3, it is also possible to use `chtml` output on the other parts of the page in addition to `svg` output for the plotly graph.
101101
Please refer to `devtools/test_dashboard/index-mathjax3chtml.html` to see an example.
102102

103+
### Need to have several WebGL graphs on a page?
104+
You may simply load [virtual-webgl](https://github.com/greggman/virtual-webgl) script for WebGL 1 (not WebGL 2) before loading other scripts.
105+
```html
106+
<script src="https://unpkg.com/virtual-webgl@1.0.6/src/virtual-webgl.js"></script>
107+
```
103108

104109
## Bundles
105110
There are two kinds of plotly.js bundles:

devtools/test_dashboard/server.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ if(!strict) {
2323
config.devtool = 'eval';
2424
}
2525

26+
var mockFolder = constants.pathToTestImageMocks;
2627

2728
// mock list
2829
getMockFiles()
@@ -104,7 +105,7 @@ compiler.run(function(devtoolsErr, devtoolsStats) {
104105

105106
function getMockFiles() {
106107
return new Promise(function(resolve, reject) {
107-
fs.readdir(constants.pathToTestImageMocks, function(err, files) {
108+
fs.readdir(mockFolder, function(err, files) {
108109
if(err) {
109110
reject(err);
110111
} else {
@@ -116,7 +117,7 @@ function getMockFiles() {
116117

117118
function readFiles(files) {
118119
var promises = files.map(function(file) {
119-
var filePath = path.join(constants.pathToTestImageMocks, file);
120+
var filePath = path.join(mockFolder, file);
120121
return readFilePromise(filePath);
121122
});
122123

dist/README.md

Lines changed: 26 additions & 26 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-
| 8.2 MB | 3.4 MB | 1 MB | 8.4 MB |
46+
| 8.2 MB | 3.4 MB | 1 MB | 8.5 MB |
4747

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-2.27.1.js
49+
> https://cdn.plot.ly/plotly-2.28.0.js
5050
51-
> https://cdn.plot.ly/plotly-2.27.1.min.js
51+
> https://cdn.plot.ly/plotly-2.28.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.6 MB | 975.2 kB | 326.2 kB |
94+
| 2.6 MB | 978.6 kB | 327.6 kB |
9595

9696
#### CDN links
97-
> https://cdn.plot.ly/plotly-basic-2.27.1.js
97+
> https://cdn.plot.ly/plotly-basic-2.28.0.js
9898
99-
> https://cdn.plot.ly/plotly-basic-2.27.1.min.js
99+
> https://cdn.plot.ly/plotly-basic-2.28.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 | 412.5 kB |
117+
| 3.3 MB | 1.2 MB | 413.9 kB |
118118

119119
#### CDN links
120-
> https://cdn.plot.ly/plotly-cartesian-2.27.1.js
120+
> https://cdn.plot.ly/plotly-cartesian-2.28.0.js
121121
122-
> https://cdn.plot.ly/plotly-cartesian-2.27.1.min.js
122+
> https://cdn.plot.ly/plotly-cartesian-2.28.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-
| 3.1 MB | 1.1 MB | 370.2 kB |
140+
| 3.1 MB | 1.1 MB | 371.4 kB |
141141

142142
#### CDN links
143-
> https://cdn.plot.ly/plotly-geo-2.27.1.js
143+
> https://cdn.plot.ly/plotly-geo-2.28.0.js
144144
145-
> https://cdn.plot.ly/plotly-geo-2.27.1.min.js
145+
> https://cdn.plot.ly/plotly-geo-2.28.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.6 MB | 1.5 MB | 490.8 kB |
163+
| 3.6 MB | 1.5 MB | 492.2 kB |
164164

165165
#### CDN links
166-
> https://cdn.plot.ly/plotly-gl3d-2.27.1.js
166+
> https://cdn.plot.ly/plotly-gl3d-2.28.0.js
167167
168-
> https://cdn.plot.ly/plotly-gl3d-2.27.1.min.js
168+
> https://cdn.plot.ly/plotly-gl3d-2.28.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-
| 4.4 MB | 1.8 MB | 596.6 kB |
186+
| 4.4 MB | 1.8 MB | 598 kB |
187187

188188
#### CDN links
189-
> https://cdn.plot.ly/plotly-gl2d-2.27.1.js
189+
> https://cdn.plot.ly/plotly-gl2d-2.28.0.js
190190
191-
> https://cdn.plot.ly/plotly-gl2d-2.27.1.min.js
191+
> https://cdn.plot.ly/plotly-gl2d-2.28.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.4 MB | 1.7 MB | 527.4 kB |
209+
| 4.4 MB | 1.7 MB | 530.3 kB |
210210

211211
#### CDN links
212-
> https://cdn.plot.ly/plotly-mapbox-2.27.1.js
212+
> https://cdn.plot.ly/plotly-mapbox-2.28.0.js
213213
214-
> https://cdn.plot.ly/plotly-mapbox-2.27.1.min.js
214+
> https://cdn.plot.ly/plotly-mapbox-2.28.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-
| 2.8 MB | 1 MB | 354.9 kB |
232+
| 2.8 MB | 1 MB | 356.4 kB |
233233

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

240240
#### npm packages
@@ -255,9 +255,9 @@ The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `ca
255255
| 8.6 MB | 3.7 MB | 1.1 MB |
256256

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

263263
#### npm packages

dist/plot-schema.json

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@
479479
"requiredOpts": []
480480
},
481481
"data_array": {
482-
"description": "An {array} of data. The value MUST be an {array}, or we ignore it. Note that typed arrays (e.g. Float32Array) are supported.",
482+
"description": "An {array} of data. The value must represent an {array} or it will be ignored, but this array can be provided in several forms: (1) a regular {array} object (2) a typed array (e.g. Float32Array) (3) an object with keys dtype, bdata, and optionally shape. In this 3rd form, dtype is one of *f8*, *f4*. *i4*, *u4*, *i2*, *u2*, *i1*, *u1* or *u1c* for Uint8ClampedArray. In addition to shorthand `dtype` above one could also use the following forms: *float64*, *float32*, *int32*, *uint32*, *int16*, *uint16*, *int8*, *uint8* or *uint8c* for Uint8ClampedArray. `bdata` is either a base64-encoded string or the ArrayBuffer of an integer or float typed array. For either multi-dimensional arrays you must also provide its dimensions separated by comma via `shape`. For example using `dtype`: *f4* and `shape`: *5,100* you can declare a 2-D array that has 5 rows and 100 columns containing float32 values i.e. 4 bits per value. `shape` is optional for one dimensional arrays.",
483483
"otherOpts": [
484484
"dflt"
485485
],
@@ -17275,7 +17275,7 @@
1727517275
"role": "object"
1727617276
},
1727717277
"upperfence": {
17278-
"description": "Sets the upper fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `upperfence` is not provided but a sample (in `y` or `x`) is set, we compute the lower as the last sample point above 1.5 times the IQR.",
17278+
"description": "Sets the upper fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `upperfence` is not provided but a sample (in `y` or `x`) is set, we compute the upper as the last sample point above 1.5 times the IQR.",
1727917279
"editType": "calc",
1728017280
"valType": "data_array"
1728117281
},
@@ -44358,6 +44358,18 @@
4435844358
"valType": "string"
4435944359
},
4436044360
"node": {
44361+
"align": {
44362+
"description": "Sets the alignment method used to position the nodes along the horizontal axis.",
44363+
"dflt": "justify",
44364+
"editType": "calc",
44365+
"valType": "enumerated",
44366+
"values": [
44367+
"justify",
44368+
"left",
44369+
"right",
44370+
"center"
44371+
]
44372+
},
4436144373
"color": {
4436244374
"arrayOk": true,
4436344375
"description": "Sets the `node` color. It can be a single value, or an array for specifying color for each `node`. If `node.color` is omitted, then the default `Plotly` color palette will be cycled through to have a variety of colors. These defaults are not fully opaque, to allow some visibility of what is beneath the node.",
@@ -58874,19 +58886,6 @@
5887458886
},
5887558887
"editType": "calc",
5887658888
"role": "object",
58877-
"shape": {
58878-
"description": "Determines the line shape. The values correspond to step-wise line shapes.",
58879-
"dflt": "linear",
58880-
"editType": "calc",
58881-
"valType": "enumerated",
58882-
"values": [
58883-
"linear",
58884-
"hv",
58885-
"vh",
58886-
"hvh",
58887-
"vhv"
58888-
]
58889-
},
5889058889
"width": {
5889158890
"description": "Sets the line width (in px).",
5889258891
"dflt": 2,

0 commit comments

Comments
 (0)