Skip to content

Commit 10d3930

Browse files
committed
2.7.0
1 parent 859fc7a commit 10d3930

25 files changed

+878
-204
lines changed

dist/README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ The main plotly.js bundles weight in at:
4646
| 8.3 MB | 3.5 MB | 1 MB | 8.6 MB |
4747

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-2.6.4.js
49+
> https://cdn.plot.ly/plotly-2.7.0.js
5050
51-
> https://cdn.plot.ly/plotly-2.6.4.min.js
51+
> https://cdn.plot.ly/plotly-2.7.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 | 973.2 kB | 316.7 kB |
94+
| 2.7 MB | 973.5 kB | 316.9 kB |
9595

9696
#### CDN links
97-
> https://cdn.plot.ly/plotly-basic-2.6.4.js
97+
> https://cdn.plot.ly/plotly-basic-2.7.0.js
9898
99-
> https://cdn.plot.ly/plotly-basic-2.6.4.min.js
99+
> https://cdn.plot.ly/plotly-basic-2.7.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 | 388.3 kB |
117+
| 3.3 MB | 1.2 MB | 388.6 kB |
118118

119119
#### CDN links
120-
> https://cdn.plot.ly/plotly-cartesian-2.6.4.js
120+
> https://cdn.plot.ly/plotly-cartesian-2.7.0.js
121121
122-
> https://cdn.plot.ly/plotly-cartesian-2.6.4.min.js
122+
> https://cdn.plot.ly/plotly-cartesian-2.7.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 MB | 1.1 MB | 359.5 kB |
140+
| 3 MB | 1.1 MB | 359.6 kB |
141141

142142
#### CDN links
143-
> https://cdn.plot.ly/plotly-geo-2.6.4.js
143+
> https://cdn.plot.ly/plotly-geo-2.7.0.js
144144
145-
> https://cdn.plot.ly/plotly-geo-2.6.4.min.js
145+
> https://cdn.plot.ly/plotly-geo-2.7.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 | 479.7 kB |
163+
| 3.8 MB | 1.5 MB | 479.8 kB |
164164

165165
#### CDN links
166-
> https://cdn.plot.ly/plotly-gl3d-2.6.4.js
166+
> https://cdn.plot.ly/plotly-gl3d-2.7.0.js
167167
168-
> https://cdn.plot.ly/plotly-gl3d-2.6.4.min.js
168+
> https://cdn.plot.ly/plotly-gl3d-2.7.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.3 MB | 1.8 MB | 570.1 kB |
186+
| 4.3 MB | 1.8 MB | 570.3 kB |
187187

188188
#### CDN links
189-
> https://cdn.plot.ly/plotly-gl2d-2.6.4.js
189+
> https://cdn.plot.ly/plotly-gl2d-2.7.0.js
190190
191-
> https://cdn.plot.ly/plotly-gl2d-2.6.4.min.js
191+
> https://cdn.plot.ly/plotly-gl2d-2.7.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 | 513.8 kB |
209+
| 4.3 MB | 1.7 MB | 513.9 kB |
210210

211211
#### CDN links
212-
> https://cdn.plot.ly/plotly-mapbox-2.6.4.js
212+
> https://cdn.plot.ly/plotly-mapbox-2.7.0.js
213213
214-
> https://cdn.plot.ly/plotly-mapbox-2.6.4.min.js
214+
> https://cdn.plot.ly/plotly-mapbox-2.7.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.9 MB | 1.1 MB | 349.3 kB |
232+
| 2.9 MB | 1.1 MB | 349.6 kB |
233233

234234
#### CDN links
235-
> https://cdn.plot.ly/plotly-finance-2.6.4.js
235+
> https://cdn.plot.ly/plotly-finance-2.7.0.js
236236
237-
> https://cdn.plot.ly/plotly-finance-2.6.4.min.js
237+
> https://cdn.plot.ly/plotly-finance-2.7.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-
| 7.7 MB | 3.2 MB | 956 kB |
255+
| 7.7 MB | 3.2 MB | 956.3 kB |
256256

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

263263
#### npm packages

dist/plot-schema.json

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27922,6 +27922,24 @@
2792227922
"editType": "calc",
2792327923
"valType": "string"
2792427924
},
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+
},
2792527943
"cumulative": {
2792627944
"currentbin": {
2792727945
"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 @@
2833828356
"editType": "none",
2833928357
"valType": "string"
2834028358
},
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+
},
2834128391
"legendgroup": {
2834228392
"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.",
2834328393
"dflt": "",
@@ -29182,6 +29232,27 @@
2918229232
"h"
2918329233
]
2918429234
},
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+
},
2918529256
"selected": {
2918629257
"editType": "style",
2918729258
"marker": {
@@ -29248,11 +29319,57 @@
2924829319
"editType": "calc",
2924929320
"valType": "string"
2925029321
},
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+
},
2925129362
"textsrc": {
2925229363
"description": "Sets the source reference on Chart Studio Cloud for `text`.",
2925329364
"editType": "none",
2925429365
"valType": "string"
2925529366
},
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+
},
2925629373
"transforms": {
2925729374
"items": {
2925829375
"transform": {

dist/plotly-basic.js

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v2.6.4
2+
* plotly.js (basic) v2.7.0
33
* Copyright 2012-2021, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -51157,7 +51157,8 @@ function findUIPattern(key, patternSpecs) {
5115751157
var spec = patternSpecs[i];
5115851158
var match = key.match(spec.pattern);
5115951159
if(match) {
51160-
return {head: match[1], attr: spec.attr};
51160+
var head = match[1] || '';
51161+
return {head: head, tail: key.substr(head.length + 1), attr: spec.attr};
5116151162
}
5116251163
}
5116351164
}
@@ -51209,26 +51210,54 @@ function valsMatch(v1, v2) {
5120951210

5121051211
function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
5121151212
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;
5121351214
var bothInheritAutorange = [];
51215+
var newAutorangeIn = {};
5121451216
var newRangeAccepted = {};
5121551217
for(key in layoutPreGUI) {
5121651218
match = findUIPattern(key, layoutUIControlPatterns);
5121751219
if(match) {
51218-
revAttr = match.attr || (match.head + '.uirevision');
51220+
head = match.head;
51221+
tail = match.tail;
51222+
revAttr = match.attr || (head + '.uirevision');
5121951223
oldRev = nestedProperty(oldFullLayout, revAttr).get();
5122051224
newRev = oldRev && getNewRev(revAttr, layout);
51225+
5122151226
if(newRev && (newRev === oldRev)) {
5122251227
preGUIVal = layoutPreGUI[key];
5122351228
if(preGUIVal === null) preGUIVal = undefined;
5122451229
newNP = nestedProperty(layout, key);
5122551230
newVal = newNP.get();
51231+
5122651232
if(valsMatch(newVal, preGUIVal)) {
51227-
if(newVal === undefined && key.substr(key.length - 9) === 'autorange') {
51228-
bothInheritAutorange.push(key.substr(0, key.length - 10));
51233+
if(newVal === undefined && tail === 'autorange') {
51234+
bothInheritAutorange.push(head);
5122951235
}
5123051236
newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
5123151237
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+
}
5123251261
}
5123351262
}
5123451263
} else {
@@ -51239,12 +51268,12 @@ function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
5123951268
// so remove it from _preGUI for next time.
5124051269
delete layoutPreGUI[key];
5124151270

51242-
if(key.substr(key.length - 8, 6) === 'range[') {
51243-
newRangeAccepted[key.substr(0, key.length - 9)] = 1;
51271+
if(match && match.tail.substr(0, 6) === 'range[') {
51272+
newRangeAccepted[match.head] = 1;
5124451273
}
5124551274
}
5124651275

51247-
// Special logic for `autorange`, since it interacts with `range`:
51276+
// More special logic for `autorange`, since it interacts with `range`:
5124851277
// If the new figure's matching `range` was kept, and `autorange`
5124951278
// wasn't supplied explicitly in either the original or the new figure,
5125051279
// 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
7559075619
}
7559175620

7559275621
transform.fontSize = font.size;
75593-
recordMinTextSize(trace.type, transform, fullLayout);
75622+
recordMinTextSize(trace.type === 'histogram' ? 'bar' : trace.type, transform, fullLayout);
7559475623
calcBar.transform = transform;
7559575624

7559675625
transition(textSelection, fullLayout, opts, makeOnCompleteCallback)
@@ -82291,7 +82320,7 @@ function getSortFunc(opts, d2c) {
8229182320
'use strict';
8229282321

8229382322
// package version injected by `npm run preprocess`
82294-
exports.version = '2.6.4';
82323+
exports.version = '2.7.0';
8229582324

8229682325
},{}]},{},[8])(8)
8229782326
});

0 commit comments

Comments
 (0)