plotly.js 2.6.4 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +3 -3
- package/dist/README.md +26 -26
- package/dist/plot-schema.json +117 -0
- package/dist/plotly-basic.js +40 -11
- package/dist/plotly-basic.min.js +2 -2
- package/dist/plotly-cartesian.js +98 -18
- package/dist/plotly-cartesian.min.js +2 -2
- package/dist/plotly-finance.js +90 -13
- package/dist/plotly-finance.min.js +2 -2
- package/dist/plotly-geo-assets.js +2 -2
- package/dist/plotly-geo.js +39 -10
- package/dist/plotly-geo.min.js +2 -2
- package/dist/plotly-gl2d.js +39 -10
- package/dist/plotly-gl2d.min.js +2 -2
- package/dist/plotly-gl3d.js +39 -10
- package/dist/plotly-gl3d.min.js +8 -8
- package/dist/plotly-mapbox.js +45 -13
- package/dist/plotly-mapbox.min.js +2 -2
- package/dist/plotly-strict.js +104 -21
- package/dist/plotly-strict.min.js +2 -2
- package/dist/plotly-with-meta.js +107 -21
- package/dist/plotly.js +104 -21
- package/dist/plotly.min.js +2 -2
- package/package.json +2 -2
- package/src/plot_api/plot_api.js +37 -8
- package/src/plots/mapbox/mapbox.js +6 -3
- package/src/traces/bar/plot.js +1 -1
- package/src/traces/histogram/attributes.js +40 -0
- package/src/traces/histogram/defaults.js +11 -0
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,23 @@ To see all merged commits on the master branch that will be part of the next plo
|
|
|
9
9
|
|
|
10
10
|
where X.Y.Z is the semver of most recent plotly.js release.
|
|
11
11
|
|
|
12
|
+
## [2.7.0] -- 2021-12-02
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- Add `texttemplate`, `textposition`, `textfont`, `textangle`,
|
|
16
|
+
`outsidetextfont`, `insidetextfont`, `insidetextanchor`,
|
|
17
|
+
`constraintext` and `cliponaxis` to `histogram` trace [[#6038](https://github.com/plotly/plotly.js/pull/6038)]
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- Bump `probe-image-size` module to v7.2.2 [[#6036](https://github.com/plotly/plotly.js/pull/6036)]
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- Fix mapbox derived coordinate for Retina displays [[#6039](https://github.com/plotly/plotly.js/pull/6039)]
|
|
24
|
+
- Fix interaction between `uirevision` and `autorange`. Because we push `autorange` and `range` back into `layout`,
|
|
25
|
+
there can be times it looks like we're applying GUI-driven changes on top of explicit autorange and other times
|
|
26
|
+
it's an implicit autorange, even though the user's intent was always implicit. This fix treats them as equivalent. [[#6046](https://github.com/plotly/plotly.js/pull/6046)]
|
|
27
|
+
|
|
28
|
+
|
|
12
29
|
## [2.6.4] -- 2021-11-26
|
|
13
30
|
|
|
14
31
|
### Fixed
|
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
|
|
|
55
55
|
|
|
56
56
|
```html
|
|
57
57
|
<head>
|
|
58
|
-
<script src="https://cdn.plot.ly/plotly-2.
|
|
58
|
+
<script src="https://cdn.plot.ly/plotly-2.7.0.min.js"></script>
|
|
59
59
|
</head>
|
|
60
60
|
<body>
|
|
61
61
|
<div id="gd"></div>
|
|
@@ -72,7 +72,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
|
|
|
72
72
|
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
|
|
73
73
|
```html
|
|
74
74
|
<script type="module">
|
|
75
|
-
import "https://cdn.plot.ly/plotly-2.
|
|
75
|
+
import "https://cdn.plot.ly/plotly-2.7.0.min.js"
|
|
76
76
|
Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
|
|
77
77
|
</script>
|
|
78
78
|
```
|
|
@@ -82,7 +82,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
|
|
|
82
82
|
### Un-minified versions are also available on CDN
|
|
83
83
|
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
|
|
84
84
|
```html
|
|
85
|
-
<script src="https://cdn.plot.ly/plotly-2.
|
|
85
|
+
<script src="https://cdn.plot.ly/plotly-2.7.0.js" charset="utf-8"></script>
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
> 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.
|
package/dist/README.md
CHANGED
|
@@ -46,9 +46,9 @@ The main plotly.js bundles weight in at:
|
|
|
46
46
|
| 8.3 MB | 3.5 MB | 1 MB | 8.6 MB |
|
|
47
47
|
|
|
48
48
|
#### CDN links
|
|
49
|
-
> https://cdn.plot.ly/plotly-2.
|
|
49
|
+
> https://cdn.plot.ly/plotly-2.7.0.js
|
|
50
50
|
|
|
51
|
-
> https://cdn.plot.ly/plotly-2.
|
|
51
|
+
> https://cdn.plot.ly/plotly-2.7.0.min.js
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
#### npm packages
|
|
@@ -91,12 +91,12 @@ The `basic` partial bundle contains trace modules `bar`, `pie` and `scatter`.
|
|
|
91
91
|
|
|
92
92
|
| Raw size | Minified size | Minified + gzip size |
|
|
93
93
|
|------|-----------------|------------------------|
|
|
94
|
-
| 2.7 MB | 973.
|
|
94
|
+
| 2.7 MB | 973.5 kB | 316.9 kB |
|
|
95
95
|
|
|
96
96
|
#### CDN links
|
|
97
|
-
> https://cdn.plot.ly/plotly-basic-2.
|
|
97
|
+
> https://cdn.plot.ly/plotly-basic-2.7.0.js
|
|
98
98
|
|
|
99
|
-
> https://cdn.plot.ly/plotly-basic-2.
|
|
99
|
+
> https://cdn.plot.ly/plotly-basic-2.7.0.min.js
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
#### npm packages
|
|
@@ -114,12 +114,12 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
|
|
|
114
114
|
|
|
115
115
|
| Raw size | Minified size | Minified + gzip size |
|
|
116
116
|
|------|-----------------|------------------------|
|
|
117
|
-
| 3.3 MB | 1.2 MB | 388.
|
|
117
|
+
| 3.3 MB | 1.2 MB | 388.6 kB |
|
|
118
118
|
|
|
119
119
|
#### CDN links
|
|
120
|
-
> https://cdn.plot.ly/plotly-cartesian-2.
|
|
120
|
+
> https://cdn.plot.ly/plotly-cartesian-2.7.0.js
|
|
121
121
|
|
|
122
|
-
> https://cdn.plot.ly/plotly-cartesian-2.
|
|
122
|
+
> https://cdn.plot.ly/plotly-cartesian-2.7.0.min.js
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
#### npm packages
|
|
@@ -137,12 +137,12 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
|
|
|
137
137
|
|
|
138
138
|
| Raw size | Minified size | Minified + gzip size |
|
|
139
139
|
|------|-----------------|------------------------|
|
|
140
|
-
| 3 MB | 1.1 MB | 359.
|
|
140
|
+
| 3 MB | 1.1 MB | 359.6 kB |
|
|
141
141
|
|
|
142
142
|
#### CDN links
|
|
143
|
-
> https://cdn.plot.ly/plotly-geo-2.
|
|
143
|
+
> https://cdn.plot.ly/plotly-geo-2.7.0.js
|
|
144
144
|
|
|
145
|
-
> https://cdn.plot.ly/plotly-geo-2.
|
|
145
|
+
> https://cdn.plot.ly/plotly-geo-2.7.0.min.js
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
#### npm packages
|
|
@@ -160,12 +160,12 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
|
|
|
160
160
|
|
|
161
161
|
| Raw size | Minified size | Minified + gzip size |
|
|
162
162
|
|------|-----------------|------------------------|
|
|
163
|
-
| 3.8 MB | 1.5 MB | 479.
|
|
163
|
+
| 3.8 MB | 1.5 MB | 479.8 kB |
|
|
164
164
|
|
|
165
165
|
#### CDN links
|
|
166
|
-
> https://cdn.plot.ly/plotly-gl3d-2.
|
|
166
|
+
> https://cdn.plot.ly/plotly-gl3d-2.7.0.js
|
|
167
167
|
|
|
168
|
-
> https://cdn.plot.ly/plotly-gl3d-2.
|
|
168
|
+
> https://cdn.plot.ly/plotly-gl3d-2.7.0.min.js
|
|
169
169
|
|
|
170
170
|
|
|
171
171
|
#### npm packages
|
|
@@ -183,12 +183,12 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
|
|
|
183
183
|
|
|
184
184
|
| Raw size | Minified size | Minified + gzip size |
|
|
185
185
|
|------|-----------------|------------------------|
|
|
186
|
-
| 4.3 MB | 1.8 MB | 570.
|
|
186
|
+
| 4.3 MB | 1.8 MB | 570.3 kB |
|
|
187
187
|
|
|
188
188
|
#### CDN links
|
|
189
|
-
> https://cdn.plot.ly/plotly-gl2d-2.
|
|
189
|
+
> https://cdn.plot.ly/plotly-gl2d-2.7.0.js
|
|
190
190
|
|
|
191
|
-
> https://cdn.plot.ly/plotly-gl2d-2.
|
|
191
|
+
> https://cdn.plot.ly/plotly-gl2d-2.7.0.min.js
|
|
192
192
|
|
|
193
193
|
|
|
194
194
|
#### npm packages
|
|
@@ -206,12 +206,12 @@ The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitym
|
|
|
206
206
|
|
|
207
207
|
| Raw size | Minified size | Minified + gzip size |
|
|
208
208
|
|------|-----------------|------------------------|
|
|
209
|
-
| 4.3 MB | 1.7 MB | 513.
|
|
209
|
+
| 4.3 MB | 1.7 MB | 513.9 kB |
|
|
210
210
|
|
|
211
211
|
#### CDN links
|
|
212
|
-
> https://cdn.plot.ly/plotly-mapbox-2.
|
|
212
|
+
> https://cdn.plot.ly/plotly-mapbox-2.7.0.js
|
|
213
213
|
|
|
214
|
-
> https://cdn.plot.ly/plotly-mapbox-2.
|
|
214
|
+
> https://cdn.plot.ly/plotly-mapbox-2.7.0.min.js
|
|
215
215
|
|
|
216
216
|
|
|
217
217
|
#### npm packages
|
|
@@ -229,12 +229,12 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
|
|
|
229
229
|
|
|
230
230
|
| Raw size | Minified size | Minified + gzip size |
|
|
231
231
|
|------|-----------------|------------------------|
|
|
232
|
-
| 2.9 MB | 1.1 MB | 349.
|
|
232
|
+
| 2.9 MB | 1.1 MB | 349.6 kB |
|
|
233
233
|
|
|
234
234
|
#### CDN links
|
|
235
|
-
> https://cdn.plot.ly/plotly-finance-2.
|
|
235
|
+
> https://cdn.plot.ly/plotly-finance-2.7.0.js
|
|
236
236
|
|
|
237
|
-
> https://cdn.plot.ly/plotly-finance-2.
|
|
237
|
+
> https://cdn.plot.ly/plotly-finance-2.7.0.min.js
|
|
238
238
|
|
|
239
239
|
|
|
240
240
|
#### npm packages
|
|
@@ -252,12 +252,12 @@ The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `ca
|
|
|
252
252
|
|
|
253
253
|
| Raw size | Minified size | Minified + gzip size |
|
|
254
254
|
|------|-----------------|------------------------|
|
|
255
|
-
| 7.7 MB | 3.2 MB | 956 kB |
|
|
255
|
+
| 7.7 MB | 3.2 MB | 956.3 kB |
|
|
256
256
|
|
|
257
257
|
#### CDN links
|
|
258
|
-
> https://cdn.plot.ly/plotly-strict-2.
|
|
258
|
+
> https://cdn.plot.ly/plotly-strict-2.7.0.js
|
|
259
259
|
|
|
260
|
-
> https://cdn.plot.ly/plotly-strict-2.
|
|
260
|
+
> https://cdn.plot.ly/plotly-strict-2.7.0.min.js
|
|
261
261
|
|
|
262
262
|
|
|
263
263
|
#### npm packages
|
package/dist/plot-schema.json
CHANGED
|
@@ -27922,6 +27922,24 @@
|
|
|
27922
27922
|
"editType": "calc",
|
|
27923
27923
|
"valType": "string"
|
|
27924
27924
|
},
|
|
27925
|
+
"cliponaxis": {
|
|
27926
|
+
"description": "Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*.",
|
|
27927
|
+
"dflt": true,
|
|
27928
|
+
"editType": "plot",
|
|
27929
|
+
"valType": "boolean"
|
|
27930
|
+
},
|
|
27931
|
+
"constraintext": {
|
|
27932
|
+
"description": "Constrain the size of text inside or outside a bar to be no larger than the bar itself.",
|
|
27933
|
+
"dflt": "both",
|
|
27934
|
+
"editType": "calc",
|
|
27935
|
+
"valType": "enumerated",
|
|
27936
|
+
"values": [
|
|
27937
|
+
"inside",
|
|
27938
|
+
"outside",
|
|
27939
|
+
"both",
|
|
27940
|
+
"none"
|
|
27941
|
+
]
|
|
27942
|
+
},
|
|
27925
27943
|
"cumulative": {
|
|
27926
27944
|
"currentbin": {
|
|
27927
27945
|
"description": "Only applies if cumulative is enabled. Sets whether the current bin is included, excluded, or has half of its value included in the current cumulative value. *include* is the default for compatibility with various other tools, however it introduces a half-bin bias to the results. *exclude* makes the opposite half-bin bias, and *half* removes it.",
|
|
@@ -28338,6 +28356,38 @@
|
|
|
28338
28356
|
"editType": "none",
|
|
28339
28357
|
"valType": "string"
|
|
28340
28358
|
},
|
|
28359
|
+
"insidetextanchor": {
|
|
28360
|
+
"description": "Determines if texts are kept at center or start/end points in `textposition` *inside* mode.",
|
|
28361
|
+
"dflt": "end",
|
|
28362
|
+
"editType": "plot",
|
|
28363
|
+
"valType": "enumerated",
|
|
28364
|
+
"values": [
|
|
28365
|
+
"end",
|
|
28366
|
+
"middle",
|
|
28367
|
+
"start"
|
|
28368
|
+
]
|
|
28369
|
+
},
|
|
28370
|
+
"insidetextfont": {
|
|
28371
|
+
"color": {
|
|
28372
|
+
"editType": "style",
|
|
28373
|
+
"valType": "color"
|
|
28374
|
+
},
|
|
28375
|
+
"description": "Sets the font used for `text` lying inside the bar.",
|
|
28376
|
+
"editType": "plot",
|
|
28377
|
+
"family": {
|
|
28378
|
+
"description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.",
|
|
28379
|
+
"editType": "plot",
|
|
28380
|
+
"noBlank": true,
|
|
28381
|
+
"strict": true,
|
|
28382
|
+
"valType": "string"
|
|
28383
|
+
},
|
|
28384
|
+
"role": "object",
|
|
28385
|
+
"size": {
|
|
28386
|
+
"editType": "plot",
|
|
28387
|
+
"min": 1,
|
|
28388
|
+
"valType": "number"
|
|
28389
|
+
}
|
|
28390
|
+
},
|
|
28341
28391
|
"legendgroup": {
|
|
28342
28392
|
"description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.",
|
|
28343
28393
|
"dflt": "",
|
|
@@ -29182,6 +29232,27 @@
|
|
|
29182
29232
|
"h"
|
|
29183
29233
|
]
|
|
29184
29234
|
},
|
|
29235
|
+
"outsidetextfont": {
|
|
29236
|
+
"color": {
|
|
29237
|
+
"editType": "style",
|
|
29238
|
+
"valType": "color"
|
|
29239
|
+
},
|
|
29240
|
+
"description": "Sets the font used for `text` lying outside the bar.",
|
|
29241
|
+
"editType": "plot",
|
|
29242
|
+
"family": {
|
|
29243
|
+
"description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.",
|
|
29244
|
+
"editType": "plot",
|
|
29245
|
+
"noBlank": true,
|
|
29246
|
+
"strict": true,
|
|
29247
|
+
"valType": "string"
|
|
29248
|
+
},
|
|
29249
|
+
"role": "object",
|
|
29250
|
+
"size": {
|
|
29251
|
+
"editType": "plot",
|
|
29252
|
+
"min": 1,
|
|
29253
|
+
"valType": "number"
|
|
29254
|
+
}
|
|
29255
|
+
},
|
|
29185
29256
|
"selected": {
|
|
29186
29257
|
"editType": "style",
|
|
29187
29258
|
"marker": {
|
|
@@ -29248,11 +29319,57 @@
|
|
|
29248
29319
|
"editType": "calc",
|
|
29249
29320
|
"valType": "string"
|
|
29250
29321
|
},
|
|
29322
|
+
"textangle": {
|
|
29323
|
+
"description": "Sets the angle of the tick labels with respect to the bar. For example, a `tickangle` of -90 draws the tick labels vertically. With *auto* the texts may automatically be rotated to fit with the maximum size in bars.",
|
|
29324
|
+
"dflt": "auto",
|
|
29325
|
+
"editType": "plot",
|
|
29326
|
+
"valType": "angle"
|
|
29327
|
+
},
|
|
29328
|
+
"textfont": {
|
|
29329
|
+
"color": {
|
|
29330
|
+
"editType": "style",
|
|
29331
|
+
"valType": "color"
|
|
29332
|
+
},
|
|
29333
|
+
"description": "Sets the text font.",
|
|
29334
|
+
"editType": "plot",
|
|
29335
|
+
"family": {
|
|
29336
|
+
"description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.",
|
|
29337
|
+
"editType": "plot",
|
|
29338
|
+
"noBlank": true,
|
|
29339
|
+
"strict": true,
|
|
29340
|
+
"valType": "string"
|
|
29341
|
+
},
|
|
29342
|
+
"role": "object",
|
|
29343
|
+
"size": {
|
|
29344
|
+
"editType": "plot",
|
|
29345
|
+
"min": 1,
|
|
29346
|
+
"valType": "number"
|
|
29347
|
+
}
|
|
29348
|
+
},
|
|
29349
|
+
"textposition": {
|
|
29350
|
+
"arrayOk": false,
|
|
29351
|
+
"description": "Specifies the location of the `text`. *inside* positions `text` inside, next to the bar end (rotated and scaled if needed). *outside* positions `text` outside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. *auto* tries to position `text` inside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If *none*, no text appears.",
|
|
29352
|
+
"dflt": "auto",
|
|
29353
|
+
"editType": "calc",
|
|
29354
|
+
"valType": "enumerated",
|
|
29355
|
+
"values": [
|
|
29356
|
+
"inside",
|
|
29357
|
+
"outside",
|
|
29358
|
+
"auto",
|
|
29359
|
+
"none"
|
|
29360
|
+
]
|
|
29361
|
+
},
|
|
29251
29362
|
"textsrc": {
|
|
29252
29363
|
"description": "Sets the source reference on Chart Studio Cloud for `text`.",
|
|
29253
29364
|
"editType": "none",
|
|
29254
29365
|
"valType": "string"
|
|
29255
29366
|
},
|
|
29367
|
+
"texttemplate": {
|
|
29368
|
+
"description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `label` and `value`.",
|
|
29369
|
+
"dflt": "",
|
|
29370
|
+
"editType": "plot",
|
|
29371
|
+
"valType": "string"
|
|
29372
|
+
},
|
|
29256
29373
|
"transforms": {
|
|
29257
29374
|
"items": {
|
|
29258
29375
|
"transform": {
|
package/dist/plotly-basic.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (basic) v2.
|
|
2
|
+
* plotly.js (basic) v2.7.0
|
|
3
3
|
* Copyright 2012-2021, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -51157,7 +51157,8 @@ function findUIPattern(key, patternSpecs) {
|
|
|
51157
51157
|
var spec = patternSpecs[i];
|
|
51158
51158
|
var match = key.match(spec.pattern);
|
|
51159
51159
|
if(match) {
|
|
51160
|
-
|
|
51160
|
+
var head = match[1] || '';
|
|
51161
|
+
return {head: head, tail: key.substr(head.length + 1), attr: spec.attr};
|
|
51161
51162
|
}
|
|
51162
51163
|
}
|
|
51163
51164
|
}
|
|
@@ -51209,26 +51210,54 @@ function valsMatch(v1, v2) {
|
|
|
51209
51210
|
|
|
51210
51211
|
function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
|
|
51211
51212
|
var layoutPreGUI = oldFullLayout._preGUI;
|
|
51212
|
-
var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal;
|
|
51213
|
+
var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal, head, tail;
|
|
51213
51214
|
var bothInheritAutorange = [];
|
|
51215
|
+
var newAutorangeIn = {};
|
|
51214
51216
|
var newRangeAccepted = {};
|
|
51215
51217
|
for(key in layoutPreGUI) {
|
|
51216
51218
|
match = findUIPattern(key, layoutUIControlPatterns);
|
|
51217
51219
|
if(match) {
|
|
51218
|
-
|
|
51220
|
+
head = match.head;
|
|
51221
|
+
tail = match.tail;
|
|
51222
|
+
revAttr = match.attr || (head + '.uirevision');
|
|
51219
51223
|
oldRev = nestedProperty(oldFullLayout, revAttr).get();
|
|
51220
51224
|
newRev = oldRev && getNewRev(revAttr, layout);
|
|
51225
|
+
|
|
51221
51226
|
if(newRev && (newRev === oldRev)) {
|
|
51222
51227
|
preGUIVal = layoutPreGUI[key];
|
|
51223
51228
|
if(preGUIVal === null) preGUIVal = undefined;
|
|
51224
51229
|
newNP = nestedProperty(layout, key);
|
|
51225
51230
|
newVal = newNP.get();
|
|
51231
|
+
|
|
51226
51232
|
if(valsMatch(newVal, preGUIVal)) {
|
|
51227
|
-
if(newVal === undefined &&
|
|
51228
|
-
bothInheritAutorange.push(
|
|
51233
|
+
if(newVal === undefined && tail === 'autorange') {
|
|
51234
|
+
bothInheritAutorange.push(head);
|
|
51229
51235
|
}
|
|
51230
51236
|
newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
|
|
51231
51237
|
continue;
|
|
51238
|
+
} else if(tail === 'autorange' || tail.substr(0, 6) === 'range[') {
|
|
51239
|
+
// Special case for (auto)range since we push it back into the layout
|
|
51240
|
+
// so all null should be treated equivalently to autorange: true with any range
|
|
51241
|
+
var pre0 = layoutPreGUI[head + '.range[0]'];
|
|
51242
|
+
var pre1 = layoutPreGUI[head + '.range[1]'];
|
|
51243
|
+
var preAuto = layoutPreGUI[head + '.autorange'];
|
|
51244
|
+
if(preAuto || (preAuto === null && pre0 === null && pre1 === null)) {
|
|
51245
|
+
// Only read the input layout once and stash the result,
|
|
51246
|
+
// so we get it before we start modifying it
|
|
51247
|
+
if(!(head in newAutorangeIn)) {
|
|
51248
|
+
var newContainer = nestedProperty(layout, head).get();
|
|
51249
|
+
newAutorangeIn[head] = newContainer && (
|
|
51250
|
+
newContainer.autorange ||
|
|
51251
|
+
(newContainer.autorange !== false && (
|
|
51252
|
+
!newContainer.range || newContainer.range.length !== 2)
|
|
51253
|
+
)
|
|
51254
|
+
);
|
|
51255
|
+
}
|
|
51256
|
+
if(newAutorangeIn[head]) {
|
|
51257
|
+
newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
|
|
51258
|
+
continue;
|
|
51259
|
+
}
|
|
51260
|
+
}
|
|
51232
51261
|
}
|
|
51233
51262
|
}
|
|
51234
51263
|
} else {
|
|
@@ -51239,12 +51268,12 @@ function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
|
|
|
51239
51268
|
// so remove it from _preGUI for next time.
|
|
51240
51269
|
delete layoutPreGUI[key];
|
|
51241
51270
|
|
|
51242
|
-
if(
|
|
51243
|
-
newRangeAccepted[
|
|
51271
|
+
if(match && match.tail.substr(0, 6) === 'range[') {
|
|
51272
|
+
newRangeAccepted[match.head] = 1;
|
|
51244
51273
|
}
|
|
51245
51274
|
}
|
|
51246
51275
|
|
|
51247
|
-
//
|
|
51276
|
+
// More special logic for `autorange`, since it interacts with `range`:
|
|
51248
51277
|
// If the new figure's matching `range` was kept, and `autorange`
|
|
51249
51278
|
// wasn't supplied explicitly in either the original or the new figure,
|
|
51250
51279
|
// we shouldn't alter that - but we may just have done that, so fix it.
|
|
@@ -75590,7 +75619,7 @@ function appendBarText(gd, plotinfo, bar, cd, i, x0, x1, y0, y1, opts, makeOnCom
|
|
|
75590
75619
|
}
|
|
75591
75620
|
|
|
75592
75621
|
transform.fontSize = font.size;
|
|
75593
|
-
recordMinTextSize(trace.type, transform, fullLayout);
|
|
75622
|
+
recordMinTextSize(trace.type === 'histogram' ? 'bar' : trace.type, transform, fullLayout);
|
|
75594
75623
|
calcBar.transform = transform;
|
|
75595
75624
|
|
|
75596
75625
|
transition(textSelection, fullLayout, opts, makeOnCompleteCallback)
|
|
@@ -82291,7 +82320,7 @@ function getSortFunc(opts, d2c) {
|
|
|
82291
82320
|
'use strict';
|
|
82292
82321
|
|
|
82293
82322
|
// package version injected by `npm run preprocess`
|
|
82294
|
-
exports.version = '2.
|
|
82323
|
+
exports.version = '2.7.0';
|
|
82295
82324
|
|
|
82296
82325
|
},{}]},{},[8])(8)
|
|
82297
82326
|
});
|