Skip to content

Commit ff7a358

Browse files
committed
1.49.1
1 parent 86d1609 commit ff7a358

24 files changed

+788
-633
lines changed

dist/README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ object. This property must be set before the plotly.js script tag, for example:
5151
Plotly.js defaults to US English (en-US) and includes British English (en) in the standard bundle.
5252
Many other localizations are available - here is an example using Swiss-German (de-CH),
5353
see the contents of this directory for the full list.
54-
They are also available on our CDN as https://cdn.plot.ly/plotly-locale-de-ch-latest.js OR https://cdn.plot.ly/plotly-locale-de-ch-1.49.0.js
54+
They are also available on our CDN as https://cdn.plot.ly/plotly-locale-de-ch-latest.js OR https://cdn.plot.ly/plotly-locale-de-ch-1.49.1.js
5555
Note that the file names are all lowercase, even though the region is uppercase when you apply a locale.
5656

5757
*After* the plotly.js script tag, add:
@@ -74,12 +74,12 @@ The main plotly.js bundle includes all the official (non-beta) trace modules.
7474

7575
It be can imported as minified javascript
7676
- using dist file `dist/plotly.min.js`
77-
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.49.0.min.js
77+
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.49.1.min.js
7878

7979
or as raw javascript:
8080
- using the `plotly.js-dist` npm package (starting in `v1.39.0`)
8181
- using dist file `dist/plotly.js`
82-
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.49.0.js
82+
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.49.1.js
8383
- using CommonJS with `require('plotly.js')`
8484

8585
If you would like to have access to the attribute meta information (including attribute descriptions as on the [schema reference page](https://plot.ly/javascript/reference/)), use dist file `dist/plotly-with-meta.js`
@@ -88,7 +88,7 @@ The main plotly.js bundle weights in at:
8888

8989
| plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js |
9090
|-----------|---------------|----------------------|---------------------|
91-
| 6.7 MB | 3.1 MB | 933.9 kB | 7 MB |
91+
| 6.7 MB | 3.1 MB | 934 kB | 7 MB |
9292

9393
## Partial bundles
9494

@@ -111,16 +111,16 @@ The `basic` partial bundle contains trace modules `scatter`, `bar` and `pie`.
111111

112112
| Raw size | Minified size | Minified + gzip size |
113113
|------|-----------------|------------------------|
114-
| 2.3 MB | 835.5 kB | 274.3 kB |
114+
| 2.3 MB | 835.6 kB | 274.3 kB |
115115

116116
#### CDN links
117117

118118
| Flavor | URL |
119119
| ------ | --- |
120120
| Latest | https://cdn.plot.ly/plotly-basic-latest.js |
121121
| Latest minified | https://cdn.plot.ly/plotly-basic-latest.min.js |
122-
| Tagged | https://cdn.plot.ly/plotly-basic-1.49.0.js |
123-
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.49.0.min.js |
122+
| Tagged | https://cdn.plot.ly/plotly-basic-1.49.1.js |
123+
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.49.1.min.js |
124124

125125
#### npm package (starting in `v1.39.0`)
126126

@@ -157,16 +157,16 @@ The `cartesian` partial bundle contains trace modules `scatter`, `bar`, `box`, `
157157

158158
| Raw size | Minified size | Minified + gzip size |
159159
|------|-----------------|------------------------|
160-
| 2.6 MB | 952.4 kB | 311.4 kB |
160+
| 2.6 MB | 952.5 kB | 311.5 kB |
161161

162162
#### CDN links
163163

164164
| Flavor | URL |
165165
| ------ | --- |
166166
| Latest | https://cdn.plot.ly/plotly-cartesian-latest.js |
167167
| Latest minified | https://cdn.plot.ly/plotly-cartesian-latest.min.js |
168-
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.49.0.js |
169-
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.49.0.min.js |
168+
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.49.1.js |
169+
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.49.1.min.js |
170170

171171
#### npm package (starting in `v1.39.0`)
172172

@@ -211,8 +211,8 @@ The `geo` partial bundle contains trace modules `scatter`, `scattergeo` and `cho
211211
| ------ | --- |
212212
| Latest | https://cdn.plot.ly/plotly-geo-latest.js |
213213
| Latest minified | https://cdn.plot.ly/plotly-geo-latest.min.js |
214-
| Tagged | https://cdn.plot.ly/plotly-geo-1.49.0.js |
215-
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.49.0.min.js |
214+
| Tagged | https://cdn.plot.ly/plotly-geo-1.49.1.js |
215+
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.49.1.min.js |
216216

217217
#### npm package (starting in `v1.39.0`)
218218

@@ -257,8 +257,8 @@ The `gl3d` partial bundle contains trace modules `scatter`, `scatter3d`, `surfac
257257
| ------ | --- |
258258
| Latest | https://cdn.plot.ly/plotly-gl3d-latest.js |
259259
| Latest minified | https://cdn.plot.ly/plotly-gl3d-latest.min.js |
260-
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.49.0.js |
261-
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.49.0.min.js |
260+
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.49.1.js |
261+
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.49.1.min.js |
262262

263263
#### npm package (starting in `v1.39.0`)
264264

@@ -295,16 +295,16 @@ The `gl2d` partial bundle contains trace modules `scatter`, `scattergl`, `splom`
295295

296296
| Raw size | Minified size | Minified + gzip size |
297297
|------|-----------------|------------------------|
298-
| 3.5 MB | 1.4 MB | 454.9 kB |
298+
| 3.5 MB | 1.4 MB | 455 kB |
299299

300300
#### CDN links
301301

302302
| Flavor | URL |
303303
| ------ | --- |
304304
| Latest | https://cdn.plot.ly/plotly-gl2d-latest.js |
305305
| Latest minified | https://cdn.plot.ly/plotly-gl2d-latest.min.js |
306-
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.49.0.js |
307-
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.49.0.min.js |
306+
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.49.1.js |
307+
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.49.1.min.js |
308308

309309
#### npm package (starting in `v1.39.0`)
310310

@@ -349,8 +349,8 @@ The `mapbox` partial bundle contains trace modules `scatter`, `scattermapbox`, `
349349
| ------ | --- |
350350
| Latest | https://cdn.plot.ly/plotly-mapbox-latest.js |
351351
| Latest minified | https://cdn.plot.ly/plotly-mapbox-latest.min.js |
352-
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.49.0.js |
353-
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.49.0.min.js |
352+
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.49.1.js |
353+
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.49.1.min.js |
354354

355355
#### npm package (starting in `v1.39.0`)
356356

@@ -387,16 +387,16 @@ The `finance` partial bundle contains trace modules `scatter`, `bar`, `histogram
387387

388388
| Raw size | Minified size | Minified + gzip size |
389389
|------|-----------------|------------------------|
390-
| 2.5 MB | 921.2 kB | 298.7 kB |
390+
| 2.5 MB | 921.3 kB | 298.7 kB |
391391

392392
#### CDN links
393393

394394
| Flavor | URL |
395395
| ------ | --- |
396396
| Latest | https://cdn.plot.ly/plotly-finance-latest.js |
397397
| Latest minified | https://cdn.plot.ly/plotly-finance-latest.min.js |
398-
| Tagged | https://cdn.plot.ly/plotly-finance-1.49.0.js |
399-
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.49.0.min.js |
398+
| Tagged | https://cdn.plot.ly/plotly-finance-1.49.1.js |
399+
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.49.1.min.js |
400400

401401
#### npm package (starting in `v1.39.0`)
402402

dist/plot-schema.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -61369,13 +61369,13 @@
6136961369
"dark",
6137061370
"satellite",
6137161371
"satellite-streets",
61372-
"0",
61373-
"1",
61374-
"2",
61375-
"3",
61376-
"4",
61377-
"5",
61378-
"6"
61372+
"open-street-map",
61373+
"white-bg",
61374+
"carto-positron",
61375+
"carto-darkmatter",
61376+
"stamen-terrain",
61377+
"stamen-toner",
61378+
"stamen-watercolor"
6137961379
],
6138061380
"dflt": "basic",
6138161381
"role": "style",

dist/plotly-basic.js

+46-25
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v1.49.0
2+
* plotly.js (basic) v1.49.1
33
* Copyright 2012-2019, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -33992,7 +33992,7 @@ exports.svgAttrs = {
3399233992
'use strict';
3399333993

3399433994
// package version injected by `npm run preprocess`
33995-
exports.version = '1.49.0';
33995+
exports.version = '1.49.1';
3399633996

3399733997
// inject promise polyfill
3399833998
_dereq_('es6-promise').polyfill();
@@ -50493,7 +50493,6 @@ function autoTickRound(ax) {
5049350493
ax._tickround = 2 - Math.floor(Math.log(dtick) / Math.LN10 + 0.01);
5049450494

5049550495
var maxend = Math.max(Math.abs(rng[0]), Math.abs(rng[1]));
50496-
5049750496
var rangeexp = Math.floor(Math.log(maxend) / Math.LN10 + 0.01);
5049850497
if(Math.abs(rangeexp) > 3) {
5049950498
if(isSIFormat(ax.exponentformat) && !beyondSI(rangeexp)) {
@@ -68301,32 +68300,32 @@ function appendBarText(gd, plotinfo, bar, calcTrace, i, x0, x1, y0, y1, opts) {
6830168300
trace.constraintext === 'both' ||
6830268301
trace.constraintext === 'outside';
6830368302

68304-
transform = getTransformToMoveOutsideBar(x0, x1, y0, y1, textBB, {
68303+
transform = getTransform(toMoveOutsideBar(x0, x1, y0, y1, textBB, {
6830568304
isHorizontal: isHorizontal,
6830668305
constrained: constrained,
6830768306
angle: trace.textangle
68308-
});
68307+
}));
6830968308
} else {
6831068309
constrained =
6831168310
trace.constraintext === 'both' ||
6831268311
trace.constraintext === 'inside';
6831368312

68314-
transform = getTransformToMoveInsideBar(x0, x1, y0, y1, textBB, {
68313+
transform = getTransform(toMoveInsideBar(x0, x1, y0, y1, textBB, {
6831568314
isHorizontal: isHorizontal,
6831668315
constrained: constrained,
6831768316
angle: trace.textangle,
6831868317
anchor: trace.insidetextanchor
68319-
});
68318+
}));
6832068319
}
6832168320

6832268321
textSelection.attr('transform', transform);
6832368322
}
6832468323

68325-
function getRotationFromAngle(angle) {
68324+
function getRotateFromAngle(angle) {
6832668325
return (angle === 'auto') ? 0 : angle;
6832768326
}
6832868327

68329-
function getTransformToMoveInsideBar(x0, x1, y0, y1, textBB, opts) {
68328+
function toMoveInsideBar(x0, x1, y0, y1, textBB, opts) {
6833068329
var isHorizontal = !!opts.isHorizontal;
6833168330
var constrained = !!opts.constrained;
6833268331
var angle = opts.angle || 0;
@@ -68363,9 +68362,9 @@ function getTransformToMoveInsideBar(x0, x1, y0, y1, textBB, opts) {
6836368362
lx = tmp;
6836468363
}
6836568364

68366-
var rotation = getRotationFromAngle(angle);
68367-
var absSin = Math.abs(Math.sin(Math.PI / 180 * rotation));
68368-
var absCos = Math.abs(Math.cos(Math.PI / 180 * rotation));
68365+
var rotate = getRotateFromAngle(angle);
68366+
var absSin = Math.abs(Math.sin(Math.PI / 180 * rotate));
68367+
var absCos = Math.abs(Math.cos(Math.PI / 180 * rotate));
6836968368

6837068369
// compute and apply text padding
6837168370
var dx = Math.max(lx * absCos, ly * absSin);
@@ -68399,12 +68398,19 @@ function getTransformToMoveInsideBar(x0, x1, y0, y1, textBB, opts) {
6839968398
var textY = (textBB.top + textBB.bottom) / 2;
6840068399

6840168400
// lastly apply auto rotation
68402-
if(isAutoRotated) rotation += 90;
68401+
if(isAutoRotated) rotate += 90;
6840368402

68404-
return getTransform(textX, textY, targetX, targetY, scale, rotation);
68403+
return {
68404+
textX: textX,
68405+
textY: textY,
68406+
targetX: targetX,
68407+
targetY: targetY,
68408+
scale: scale,
68409+
rotate: rotate
68410+
};
6840568411
}
6840668412

68407-
function getTransformToMoveOutsideBar(x0, x1, y0, y1, textBB, opts) {
68413+
function toMoveOutsideBar(x0, x1, y0, y1, textBB, opts) {
6840868414
var isHorizontal = !!opts.isHorizontal;
6840968415
var constrained = !!opts.constrained;
6841068416
var angle = opts.angle || 0;
@@ -68423,17 +68429,17 @@ function getTransformToMoveOutsideBar(x0, x1, y0, y1, textBB, opts) {
6842368429
textpad = (lx > 2 * TEXTPAD) ? TEXTPAD : 0;
6842468430
}
6842568431

68426-
// compute rotation and scale
68432+
// compute rotate and scale
6842768433
var scale = 1;
6842868434
if(constrained) {
6842968435
scale = (isHorizontal) ?
6843068436
Math.min(1, ly / textHeight) :
6843168437
Math.min(1, lx / textWidth);
6843268438
}
6843368439

68434-
var rotation = getRotationFromAngle(angle);
68435-
var absSin = Math.abs(Math.sin(Math.PI / 180 * rotation));
68436-
var absCos = Math.abs(Math.cos(Math.PI / 180 * rotation));
68440+
var rotate = getRotateFromAngle(angle);
68441+
var absSin = Math.abs(Math.sin(Math.PI / 180 * rotate));
68442+
var absCos = Math.abs(Math.cos(Math.PI / 180 * rotate));
6843768443

6843868444
// compute text and target positions
6843968445
var targetWidth = scale * (isHorizontal ? textHeight : textWidth);
@@ -68452,10 +68458,24 @@ function getTransformToMoveOutsideBar(x0, x1, y0, y1, textBB, opts) {
6845268458
var textX = (textBB.left + textBB.right) / 2;
6845368459
var textY = (textBB.top + textBB.bottom) / 2;
6845468460

68455-
return getTransform(textX, textY, targetX, targetY, scale, rotation);
68461+
return {
68462+
textX: textX,
68463+
textY: textY,
68464+
targetX: targetX,
68465+
targetY: targetY,
68466+
scale: scale,
68467+
rotate: rotate
68468+
};
6845668469
}
6845768470

68458-
function getTransform(textX, textY, targetX, targetY, scale, rotation) {
68471+
function getTransform(opts) {
68472+
var textX = opts.textX;
68473+
var textY = opts.textY;
68474+
var targetX = opts.targetX;
68475+
var targetY = opts.targetY;
68476+
var scale = opts.scale;
68477+
var rotate = opts.rotate;
68478+
6845968479
var transformScale;
6846068480
var transformRotate;
6846168481
var transformTranslate;
@@ -68466,8 +68486,8 @@ function getTransform(textX, textY, targetX, targetY, scale, rotation) {
6846668486
transformScale = '';
6846768487
}
6846868488

68469-
transformRotate = (rotation) ?
68470-
'rotate(' + rotation + ' ' + textX + ' ' + textY + ') ' : '';
68489+
transformRotate = (rotate) ?
68490+
'rotate(' + rotate + ' ' + textX + ' ' + textY + ') ' : '';
6847168491

6847268492
// Note that scaling also affects the center of the text box
6847368493
var translateX = (targetX - scale * textX);
@@ -68571,8 +68591,9 @@ function calcTextinfo(calcTrace, index, xa, ya) {
6857168591

6857268592
module.exports = {
6857368593
plot: plot,
68574-
getTransformToMoveInsideBar: getTransformToMoveInsideBar,
68575-
getTransformToMoveOutsideBar: getTransformToMoveOutsideBar
68594+
getTransform: getTransform,
68595+
toMoveInsideBar: toMoveInsideBar,
68596+
toMoveOutsideBar: toMoveOutsideBar
6857668597
};
6857768598

6857868599
},{"../../components/color":42,"../../components/drawing":63,"../../lib":160,"../../lib/svg_text_utils":181,"../../plots/cartesian/axes":204,"../../registry":243,"./attributes":253,"./helpers":258,"./style":266,"d3":7,"fast-isnumeric":9}],264:[function(_dereq_,module,exports){

dist/plotly-basic.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)