Skip to content

Commit

Permalink
1.49.1
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Jul 31, 2019
1 parent 86d1609 commit ff7a358
Show file tree
Hide file tree
Showing 24 changed files with 788 additions and 633 deletions.
44 changes: 22 additions & 22 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object. This property must be set before the plotly.js script tag, for example:
Plotly.js defaults to US English (en-US) and includes British English (en) in the standard bundle.
Many other localizations are available - here is an example using Swiss-German (de-CH),
see the contents of this directory for the full list.
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
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
Note that the file names are all lowercase, even though the region is uppercase when you apply a locale.

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

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

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

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`
Expand All @@ -88,7 +88,7 @@ The main plotly.js bundle weights in at:

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

## Partial bundles

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 2.3 MB | 835.5 kB | 274.3 kB |
| 2.3 MB | 835.6 kB | 274.3 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-basic-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-basic-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-basic-1.49.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.49.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-basic-1.49.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.49.1.min.js |

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

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 2.6 MB | 952.4 kB | 311.4 kB |
| 2.6 MB | 952.5 kB | 311.5 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-cartesian-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-cartesian-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.49.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.49.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.49.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.49.1.min.js |

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

Expand Down Expand Up @@ -211,8 +211,8 @@ The `geo` partial bundle contains trace modules `scatter`, `scattergeo` and `cho
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-geo-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-geo-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-geo-1.49.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.49.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-geo-1.49.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.49.1.min.js |

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

Expand Down Expand Up @@ -257,8 +257,8 @@ The `gl3d` partial bundle contains trace modules `scatter`, `scatter3d`, `surfac
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-gl3d-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-gl3d-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.49.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.49.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.49.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.49.1.min.js |

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

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 3.5 MB | 1.4 MB | 454.9 kB |
| 3.5 MB | 1.4 MB | 455 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-gl2d-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-gl2d-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.49.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.49.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.49.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.49.1.min.js |

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

Expand Down Expand Up @@ -349,8 +349,8 @@ The `mapbox` partial bundle contains trace modules `scatter`, `scattermapbox`, `
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-mapbox-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-mapbox-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.49.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.49.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.49.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.49.1.min.js |

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

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 2.5 MB | 921.2 kB | 298.7 kB |
| 2.5 MB | 921.3 kB | 298.7 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-finance-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-finance-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-finance-1.49.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.49.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-finance-1.49.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.49.1.min.js |

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

Expand Down
14 changes: 7 additions & 7 deletions dist/plot-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -61369,13 +61369,13 @@
"dark",
"satellite",
"satellite-streets",
"0",
"1",
"2",
"3",
"4",
"5",
"6"
"open-street-map",
"white-bg",
"carto-positron",
"carto-darkmatter",
"stamen-terrain",
"stamen-toner",
"stamen-watercolor"
],
"dflt": "basic",
"role": "style",
Expand Down
71 changes: 46 additions & 25 deletions dist/plotly-basic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* plotly.js (basic) v1.49.0
* plotly.js (basic) v1.49.1
* Copyright 2012-2019, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
Expand Down Expand Up @@ -33992,7 +33992,7 @@ exports.svgAttrs = {
'use strict';

// package version injected by `npm run preprocess`
exports.version = '1.49.0';
exports.version = '1.49.1';

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

var maxend = Math.max(Math.abs(rng[0]), Math.abs(rng[1]));

var rangeexp = Math.floor(Math.log(maxend) / Math.LN10 + 0.01);
if(Math.abs(rangeexp) > 3) {
if(isSIFormat(ax.exponentformat) && !beyondSI(rangeexp)) {
Expand Down Expand Up @@ -68301,32 +68300,32 @@ function appendBarText(gd, plotinfo, bar, calcTrace, i, x0, x1, y0, y1, opts) {
trace.constraintext === 'both' ||
trace.constraintext === 'outside';

transform = getTransformToMoveOutsideBar(x0, x1, y0, y1, textBB, {
transform = getTransform(toMoveOutsideBar(x0, x1, y0, y1, textBB, {
isHorizontal: isHorizontal,
constrained: constrained,
angle: trace.textangle
});
}));
} else {
constrained =
trace.constraintext === 'both' ||
trace.constraintext === 'inside';

transform = getTransformToMoveInsideBar(x0, x1, y0, y1, textBB, {
transform = getTransform(toMoveInsideBar(x0, x1, y0, y1, textBB, {
isHorizontal: isHorizontal,
constrained: constrained,
angle: trace.textangle,
anchor: trace.insidetextanchor
});
}));
}

textSelection.attr('transform', transform);
}

function getRotationFromAngle(angle) {
function getRotateFromAngle(angle) {
return (angle === 'auto') ? 0 : angle;
}

function getTransformToMoveInsideBar(x0, x1, y0, y1, textBB, opts) {
function toMoveInsideBar(x0, x1, y0, y1, textBB, opts) {
var isHorizontal = !!opts.isHorizontal;
var constrained = !!opts.constrained;
var angle = opts.angle || 0;
Expand Down Expand Up @@ -68363,9 +68362,9 @@ function getTransformToMoveInsideBar(x0, x1, y0, y1, textBB, opts) {
lx = tmp;
}

var rotation = getRotationFromAngle(angle);
var absSin = Math.abs(Math.sin(Math.PI / 180 * rotation));
var absCos = Math.abs(Math.cos(Math.PI / 180 * rotation));
var rotate = getRotateFromAngle(angle);
var absSin = Math.abs(Math.sin(Math.PI / 180 * rotate));
var absCos = Math.abs(Math.cos(Math.PI / 180 * rotate));

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

// lastly apply auto rotation
if(isAutoRotated) rotation += 90;
if(isAutoRotated) rotate += 90;

return getTransform(textX, textY, targetX, targetY, scale, rotation);
return {
textX: textX,
textY: textY,
targetX: targetX,
targetY: targetY,
scale: scale,
rotate: rotate
};
}

function getTransformToMoveOutsideBar(x0, x1, y0, y1, textBB, opts) {
function toMoveOutsideBar(x0, x1, y0, y1, textBB, opts) {
var isHorizontal = !!opts.isHorizontal;
var constrained = !!opts.constrained;
var angle = opts.angle || 0;
Expand All @@ -68423,17 +68429,17 @@ function getTransformToMoveOutsideBar(x0, x1, y0, y1, textBB, opts) {
textpad = (lx > 2 * TEXTPAD) ? TEXTPAD : 0;
}

// compute rotation and scale
// compute rotate and scale
var scale = 1;
if(constrained) {
scale = (isHorizontal) ?
Math.min(1, ly / textHeight) :
Math.min(1, lx / textWidth);
}

var rotation = getRotationFromAngle(angle);
var absSin = Math.abs(Math.sin(Math.PI / 180 * rotation));
var absCos = Math.abs(Math.cos(Math.PI / 180 * rotation));
var rotate = getRotateFromAngle(angle);
var absSin = Math.abs(Math.sin(Math.PI / 180 * rotate));
var absCos = Math.abs(Math.cos(Math.PI / 180 * rotate));

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

return getTransform(textX, textY, targetX, targetY, scale, rotation);
return {
textX: textX,
textY: textY,
targetX: targetX,
targetY: targetY,
scale: scale,
rotate: rotate
};
}

function getTransform(textX, textY, targetX, targetY, scale, rotation) {
function getTransform(opts) {
var textX = opts.textX;
var textY = opts.textY;
var targetX = opts.targetX;
var targetY = opts.targetY;
var scale = opts.scale;
var rotate = opts.rotate;

var transformScale;
var transformRotate;
var transformTranslate;
Expand All @@ -68466,8 +68486,8 @@ function getTransform(textX, textY, targetX, targetY, scale, rotation) {
transformScale = '';
}

transformRotate = (rotation) ?
'rotate(' + rotation + ' ' + textX + ' ' + textY + ') ' : '';
transformRotate = (rotate) ?
'rotate(' + rotate + ' ' + textX + ' ' + textY + ') ' : '';

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

module.exports = {
plot: plot,
getTransformToMoveInsideBar: getTransformToMoveInsideBar,
getTransformToMoveOutsideBar: getTransformToMoveOutsideBar
getTransform: getTransform,
toMoveInsideBar: toMoveInsideBar,
toMoveOutsideBar: toMoveOutsideBar
};

},{"../../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){
Expand Down
4 changes: 2 additions & 2 deletions dist/plotly-basic.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit ff7a358

Please sign in to comment.