Skip to content

Commit 75987d0

Browse files
committed
1.31.1
1 parent d5a836b commit 75987d0

24 files changed

+1320
-1160
lines changed

dist/README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ The main plotly.js bundle includes all the official (non-beta) trace modules.
3737

3838
It be can imported as minified javascript
3939
- using dist file `dist/plotly.min.js`
40-
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.31.0.min.js
40+
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.31.1.min.js
4141

4242
or as raw javascript:
4343
- using dist file `dist/plotly.js`
44-
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.31.0.js
44+
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.31.1.js
4545
- using CommonJS with `require('plotly.js')`
4646

4747
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`
@@ -50,7 +50,7 @@ The main plotly.js bundle weights in at:
5050

5151
| plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js |
5252
|-----------|---------------|----------------------|---------------------|
53-
| 5.6 MB | 2.2 MB | 683.9 kB | 5.8 MB |
53+
| 5.6 MB | 2.2 MB | 684.4 kB | 5.8 MB |
5454

5555
## Partial bundles
5656

@@ -74,13 +74,13 @@ The `basic` partial bundle contains the `scatter`, `bar` and `pie` trace modules
7474
| dist bundle (minified) | `dist/plotly-basic.min.js` |
7575
| CDN URL (latest) | https://cdn.plot.ly/plotly-basic-latest.js |
7676
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-basic-latest.min.js |
77-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-basic-1.31.0.js |
78-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-basic-1.31.0.min.js |
77+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-basic-1.31.1.js |
78+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-basic-1.31.1.min.js |
7979
| CommonJS | `require('plotly.js/lib/index-basic')` |
8080

8181
| Raw size | Minified size | Minified + gzip size |
8282
|------|-----------------|------------------------|
83-
| 1.9 MB | 686.2 kB | 223.1 kB |
83+
| 1.9 MB | 686.3 kB | 223.1 kB |
8484

8585
### plotly.js cartesian
8686

@@ -92,13 +92,13 @@ The `cartesian` partial bundle contains the `scatter`, `bar`, `box`, `heatmap`,
9292
| dist bundle (minified) | `dist/plotly-cartesian.min.js` |
9393
| CDN URL (latest) | https://cdn.plot.ly/plotly-cartesian-latest.js |
9494
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-cartesian-latest.min.js |
95-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-cartesian-1.31.0.js |
96-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-cartesian-1.31.0.min.js |
95+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-cartesian-1.31.1.js |
96+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-cartesian-1.31.1.min.js |
9797
| CommonJS | `require('plotly.js/lib/index-cartesian')` |
9898

9999
| Raw size | Minified size | Minified + gzip size |
100100
|------|-----------------|------------------------|
101-
| 2.1 MB | 772 kB | 249.1 kB |
101+
| 2.1 MB | 772 kB | 249.2 kB |
102102

103103
### plotly.js geo
104104

@@ -110,8 +110,8 @@ The `geo` partial bundle contains the `scatter`, `scattergeo` and `choropleth` t
110110
| dist bundle (minified) | `dist/plotly-geo.min.js` |
111111
| CDN URL (latest) | https://cdn.plot.ly/plotly-geo-latest.js |
112112
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-geo-latest.min.js |
113-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-geo-1.31.0.js |
114-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-geo-1.31.0.min.js |
113+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-geo-1.31.1.js |
114+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-geo-1.31.1.min.js |
115115
| CommonJS | `require('plotly.js/lib/index-geo')` |
116116

117117
| Raw size | Minified size | Minified + gzip size |
@@ -128,8 +128,8 @@ The `gl3d` partial bundle contains the `scatter`, `scatter3d`, `surface` and `me
128128
| dist bundle (minified) | `dist/plotly-gl3d.min.js` |
129129
| CDN URL (latest) | https://cdn.plot.ly/plotly-gl3d-latest.js |
130130
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-gl3d-latest.min.js |
131-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl3d-1.31.0.js |
132-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl3d-1.31.0.min.js |
131+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl3d-1.31.1.js |
132+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl3d-1.31.1.min.js |
133133
| CommonJS | `require('plotly.js/lib/index-gl3d')` |
134134

135135
| Raw size | Minified size | Minified + gzip size |
@@ -146,13 +146,13 @@ The `gl2d` partial bundle contains the `scatter`, `scattergl`, `pointcloud`, `he
146146
| dist bundle (minified) | `dist/plotly-gl2d.min.js` |
147147
| CDN URL (latest) | https://cdn.plot.ly/plotly-gl2d-latest.js |
148148
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-gl2d-latest.min.js |
149-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl2d-1.31.0.js |
150-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl2d-1.31.0.min.js |
149+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl2d-1.31.1.js |
150+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl2d-1.31.1.min.js |
151151
| CommonJS | `require('plotly.js/lib/index-gl2d')` |
152152

153153
| Raw size | Minified size | Minified + gzip size |
154154
|------|-----------------|------------------------|
155-
| 2.9 MB | 1.2 MB | 371.1 kB |
155+
| 2.9 MB | 1.2 MB | 371.4 kB |
156156

157157
### plotly.js mapbox
158158

@@ -164,13 +164,13 @@ The `mapbox` partial bundle contains the `scatter` and `scattermapbox` trace mod
164164
| dist bundle (minified) | `dist/plotly-mapbox.min.js` |
165165
| CDN URL (latest) | https://cdn.plot.ly/plotly-mapbox-latest.js |
166166
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-mapbox-latest.min.js |
167-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-mapbox-1.31.0.js |
168-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-mapbox-1.31.0.min.js |
167+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-mapbox-1.31.1.js |
168+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-mapbox-1.31.1.min.js |
169169
| CommonJS | `require('plotly.js/lib/index-mapbox')` |
170170

171171
| Raw size | Minified size | Minified + gzip size |
172172
|------|-----------------|------------------------|
173-
| 2.9 MB | 1.1 MB | 336.4 kB |
173+
| 2.9 MB | 1.1 MB | 336.5 kB |
174174

175175
### plotly.js finance
176176

@@ -182,13 +182,13 @@ The `finance` partial bundle contains the `scatter`, `bar`, `histogram`, `pie`,
182182
| dist bundle (minified) | `dist/plotly-finance.min.js` |
183183
| CDN URL (latest) | https://cdn.plot.ly/plotly-finance-latest.js |
184184
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-finance-latest.min.js |
185-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-finance-1.31.0.js |
186-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-finance-1.31.0.min.js |
185+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-finance-1.31.1.js |
186+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-finance-1.31.1.min.js |
187187
| CommonJS | `require('plotly.js/lib/index-finance')` |
188188

189189
| Raw size | Minified size | Minified + gzip size |
190190
|------|-----------------|------------------------|
191-
| 1.9 MB | 716.5 kB | 231.6 kB |
191+
| 1.9 MB | 716.6 kB | 231.6 kB |
192192

193193
----------------
194194

dist/npm-ls.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plotly.js",
3-
"version": "1.31.0",
3+
"version": "1.31.1",
44
"dependencies": {
55
"3d-view": {
66
"version": "2.0.0",

dist/plot-schema.json

+14-6
Original file line numberDiff line numberDiff line change
@@ -21822,12 +21822,14 @@
2182221822
"width": {
2182321823
"valType": "number",
2182421824
"arrayOk": true,
21825+
"dflt": 1,
2182521826
"role": "style",
2182621827
"editType": "calc"
2182721828
},
2182821829
"color": {
2182921830
"valType": "color",
2183021831
"arrayOk": true,
21832+
"dflt": "grey",
2183121833
"role": "style",
2183221834
"editType": "calc"
2183321835
},
@@ -21867,25 +21869,27 @@
2186721869
"font": {
2186821870
"family": {
2186921871
"valType": "string",
21870-
"arrayOk": true,
2187121872
"role": "style",
2187221873
"noBlank": true,
2187321874
"strict": true,
2187421875
"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 plotly service (at https://plot.ly 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*.",
21876+
"arrayOk": true,
2187521877
"editType": "calc"
2187621878
},
2187721879
"size": {
2187821880
"valType": "number",
21879-
"arrayOk": true,
2188021881
"role": "style",
21882+
"min": 1,
21883+
"arrayOk": true,
2188121884
"editType": "calc"
2188221885
},
2188321886
"color": {
2188421887
"valType": "color",
21885-
"arrayOk": true,
2188621888
"role": "style",
21889+
"arrayOk": true,
2188721890
"editType": "calc"
2188821891
},
21892+
"description": "",
2188921893
"editType": "calc",
2189021894
"role": "object",
2189121895
"familysrc": {
@@ -21995,12 +21999,14 @@
2199521999
"width": {
2199622000
"valType": "number",
2199722001
"arrayOk": true,
22002+
"dflt": 1,
2199822003
"role": "style",
2199922004
"editType": "calc"
2200022005
},
2200122006
"color": {
2200222007
"valType": "color",
2200322008
"arrayOk": true,
22009+
"dflt": "grey",
2200422010
"role": "style",
2200522011
"editType": "calc"
2200622012
},
@@ -22040,25 +22046,27 @@
2204022046
"font": {
2204122047
"family": {
2204222048
"valType": "string",
22043-
"arrayOk": true,
2204422049
"role": "style",
2204522050
"noBlank": true,
2204622051
"strict": true,
2204722052
"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 plotly service (at https://plot.ly 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*.",
22053+
"arrayOk": true,
2204822054
"editType": "calc"
2204922055
},
2205022056
"size": {
2205122057
"valType": "number",
22052-
"arrayOk": true,
2205322058
"role": "style",
22059+
"min": 1,
22060+
"arrayOk": true,
2205422061
"editType": "calc"
2205522062
},
2205622063
"color": {
2205722064
"valType": "color",
22058-
"arrayOk": true,
2205922065
"role": "style",
22066+
"arrayOk": true,
2206022067
"editType": "calc"
2206122068
},
22069+
"description": "",
2206222070
"editType": "calc",
2206322071
"role": "object",
2206422072
"familysrc": {

dist/plotly-basic.js

+37-29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v1.31.0
2+
* plotly.js (basic) v1.31.1
33
* Copyright 2012-2017, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -16865,10 +16865,12 @@ dragElement.unhoverRaw = unhover.raw;
1686516865
* e is the original event
1686616866
*/
1686716867
dragElement.init = function init(options) {
16868-
var gd = options.gd,
16869-
numClicks = 1,
16870-
DBLCLICKDELAY = interactConstants.DBLCLICKDELAY,
16871-
startX,
16868+
var gd = options.gd;
16869+
var numClicks = 1;
16870+
var DBLCLICKDELAY = interactConstants.DBLCLICKDELAY;
16871+
var element = options.element;
16872+
16873+
var startX,
1687216874
startY,
1687316875
newMouseDownTime,
1687416876
cursor,
@@ -16877,12 +16879,16 @@ dragElement.init = function init(options) {
1687716879

1687816880
if(!gd._mouseDownTime) gd._mouseDownTime = 0;
1687916881

16880-
options.element.style.pointerEvents = 'all';
16882+
element.style.pointerEvents = 'all';
1688116883

16882-
options.element.onmousedown = onStart;
16883-
options.element.ontouchstart = onStart;
16884+
element.onmousedown = onStart;
16885+
element.ontouchstart = onStart;
1688416886

1688516887
function onStart(e) {
16888+
if(e.buttons && e.buttons === 2) { // right click
16889+
return;
16890+
}
16891+
1688616892
// make dragging and dragged into properties of gd
1688716893
// so that others can look at and modify them
1688816894
gd._dragged = false;
@@ -16907,29 +16913,28 @@ dragElement.init = function init(options) {
1690716913

1690816914
if(hasHover) {
1690916915
dragCover = coverSlip();
16910-
dragCover.style.cursor = window.getComputedStyle(options.element).cursor;
16916+
dragCover.style.cursor = window.getComputedStyle(element).cursor;
1691116917
}
1691216918
else {
1691316919
// document acts as a dragcover for mobile, bc we can't create dragcover dynamically
1691416920
dragCover = document;
1691516921
cursor = window.getComputedStyle(document.documentElement).cursor;
16916-
document.documentElement.style.cursor = window.getComputedStyle(options.element).cursor;
16922+
document.documentElement.style.cursor = window.getComputedStyle(element).cursor;
1691716923
}
1691816924

16919-
dragCover.addEventListener('mousemove', onMove);
16920-
dragCover.addEventListener('mouseup', onDone);
16921-
dragCover.addEventListener('mouseout', onDone);
16922-
dragCover.addEventListener('touchmove', onMove);
16923-
dragCover.addEventListener('touchend', onDone);
16925+
document.addEventListener('mousemove', onMove);
16926+
document.addEventListener('mouseup', onDone);
16927+
document.addEventListener('touchmove', onMove);
16928+
document.addEventListener('touchend', onDone);
1692416929

1692516930
return Lib.pauseEvent(e);
1692616931
}
1692716932

1692816933
function onMove(e) {
16929-
var offset = pointerOffset(e),
16930-
dx = offset[0] - startX,
16931-
dy = offset[1] - startY,
16932-
minDrag = options.minDrag || constants.MINDRAG;
16934+
var offset = pointerOffset(e);
16935+
var dx = offset[0] - startX;
16936+
var dy = offset[1] - startY;
16937+
var minDrag = options.minDrag || constants.MINDRAG;
1693316938

1693416939
if(Math.abs(dx) < minDrag) dx = 0;
1693516940
if(Math.abs(dy) < minDrag) dy = 0;
@@ -16944,11 +16949,10 @@ dragElement.init = function init(options) {
1694416949
}
1694516950

1694616951
function onDone(e) {
16947-
dragCover.removeEventListener('mousemove', onMove);
16948-
dragCover.removeEventListener('mouseup', onDone);
16949-
dragCover.removeEventListener('mouseout', onDone);
16950-
dragCover.removeEventListener('touchmove', onMove);
16951-
dragCover.removeEventListener('touchend', onDone);
16952+
document.removeEventListener('mousemove', onMove);
16953+
document.removeEventListener('mouseup', onDone);
16954+
document.removeEventListener('touchmove', onMove);
16955+
document.removeEventListener('touchend', onDone);
1695216956

1695316957
if(hasHover) {
1695416958
Lib.removeElement(dragCover);
@@ -29564,7 +29568,7 @@ exports.svgAttrs = {
2956429568
var Plotly = require('./plotly');
2956529569

2956629570
// package version injected by `npm run preprocess`
29567-
exports.version = '1.31.0';
29571+
exports.version = '1.31.1';
2956829572

2956929573
// inject promise polyfill
2957029574
require('es6-promise').polyfill();
@@ -53350,7 +53354,11 @@ var fileSaver = function(url, name) {
5335053354

5335153355
// IE 10+ (native saveAs)
5335253356
if(typeof navigator !== 'undefined' && navigator.msSaveBlob) {
53353-
navigator.msSaveBlob(new Blob([url]), name);
53357+
// At this point we are only dealing with a SVG encoded as
53358+
// a data URL (since IE only supports SVG)
53359+
var encoded = url.split(/^data:image\/svg\+xml,/)[1];
53360+
var svg = decodeURIComponent(encoded);
53361+
navigator.msSaveBlob(new Blob([svg]), name);
5335453362
resolve(name);
5335553363
}
5335653364

@@ -53785,7 +53793,7 @@ module.exports = function toSVG(gd, format, scale) {
5378553793
// url in svg are single quoted
5378653794
// since we changed double to single
5378753795
// we'll need to change these to double-quoted
53788-
s = s.replace(/(\('#)([^']*)('\))/gi, '(\"$2\")');
53796+
s = s.replace(/(\('#)([^']*)('\))/gi, '(\"#$2\")');
5378953797
// font names with spaces will be escaped single-quoted
5379053798
// we'll need to change these to double-quoted
5379153799
s = s.replace(/(\\')/gi, '\"');
@@ -54923,7 +54931,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
5492354931
var node3 = cd[0].node3;
5492454932
var i;
5492554933

54926-
if(trace.visible !== true) return;
54934+
if(trace.visible !== true) return [];
5492754935

5492854936
if(polygon === false) {
5492954937
// clear selection
@@ -59442,7 +59450,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
5944259450

5944359451
// TODO: include lines? that would require per-segment line properties
5944459452
var hasOnlyLines = (!subtypes.hasMarkers(trace) && !subtypes.hasText(trace));
59445-
if(trace.visible !== true || hasOnlyLines) return;
59453+
if(trace.visible !== true || hasOnlyLines) return [];
5944659454

5944759455
var opacity = Array.isArray(marker.opacity) ? 1 : marker.opacity;
5944859456

dist/plotly-basic.min.js

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

0 commit comments

Comments
 (0)