Skip to content

Commit

Permalink
1.43.1
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Dec 21, 2018
1 parent 6730655 commit fc0ba5d
Show file tree
Hide file tree
Showing 24 changed files with 813 additions and 504 deletions.
50 changes: 25 additions & 25 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.43.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.43.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.43.0.min.js
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.43.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.43.0.js
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.43.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 MB | 2.8 MB | 843 kB | 6.2 MB |
| 6 MB | 2.8 MB | 843.2 kB | 6.3 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 | 805.9 kB | 263.4 kB |
| 2.3 MB | 806.3 kB | 263.5 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.43.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.43.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-basic-1.43.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.43.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 | 918.8 kB | 299.1 kB |
| 2.6 MB | 919.3 kB | 299.2 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.43.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.43.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.43.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.43.1.min.js |

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

Expand Down Expand Up @@ -203,16 +203,16 @@ The `geo` partial bundle contains trace modules `scatter`, `scattergeo` and `cho

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 2.3 MB | 823.7 kB | 271.3 kB |
| 2.3 MB | 824.1 kB | 271.4 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| 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.43.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.43.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-geo-1.43.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.43.1.min.js |

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

Expand Down Expand Up @@ -249,16 +249,16 @@ The `gl3d` partial bundle contains trace modules `scatter`, `scatter3d`, `surfac

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 3.3 MB | 1.3 MB | 422.9 kB |
| 3.3 MB | 1.3 MB | 423 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| 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.43.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.43.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.43.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.43.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.4 MB | 1.4 MB | 440.9 kB |
| 3.4 MB | 1.4 MB | 441 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.43.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.43.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.43.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.43.1.min.js |

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

Expand Down Expand Up @@ -341,16 +341,16 @@ The `mapbox` partial bundle contains trace modules `scatter` and `scattermapbox`

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 2.8 MB | 1.3 MB | 409.1 kB |
| 2.8 MB | 1.3 MB | 409.2 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| 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.43.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.43.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.43.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.43.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.3 MB | 837.9 kB | 273.1 kB |
| 2.4 MB | 838.3 kB | 273.2 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.43.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.43.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-finance-1.43.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.43.1.min.js |

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

Expand Down
129 changes: 80 additions & 49 deletions dist/plotly-basic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* plotly.js (basic) v1.43.0
* plotly.js (basic) v1.43.1
* Copyright 2012-2018, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
Expand Down Expand Up @@ -33751,7 +33751,7 @@ exports.svgAttrs = {
'use strict';

// package version injected by `npm run preprocess`
exports.version = '1.43.0';
exports.version = '1.43.1';

// inject promise polyfill
_dereq_('es6-promise').polyfill();
Expand Down Expand Up @@ -50593,9 +50593,13 @@ axes.draw = function(gd, arg, opts) {
plotinfo.xaxislayer.selectAll('.' + xa._id + 'tick').remove();
plotinfo.yaxislayer.selectAll('.' + ya._id + 'tick').remove();
plotinfo.xaxislayer.selectAll('.' + xa._id + 'tick2').remove();
plotinfo.yaxislayer.selectAll('.' + ya._id + 'tick2').remove();
plotinfo.xaxislayer.selectAll('.' + xa._id + 'divider').remove();
plotinfo.yaxislayer.selectAll('.' + ya._id + 'divider').remove();

if(plotinfo.gridlayer) plotinfo.gridlayer.selectAll('path').remove();
if(plotinfo.zerolinelayer) plotinfo.zerolinelayer.selectAll('path').remove();

fullLayout._infolayer.select('.g-' + xa._id + 'title').remove();
fullLayout._infolayer.select('.g-' + ya._id + 'title').remove();
});
Expand Down Expand Up @@ -53621,13 +53625,14 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
for(i = 0; i < axList.length; i++) {
ax = axList[i];

if(!ax._rangeInitial) {
attrs[ax._name + '.autorange'] = true;
}
else {
rangeInitial = ax._rangeInitial;
attrs[ax._name + '.range[0]'] = rangeInitial[0];
attrs[ax._name + '.range[1]'] = rangeInitial[1];
if(!ax.fixedrange) {
if(!ax._rangeInitial) {
attrs[ax._name + '.autorange'] = true;
} else {
rangeInitial = ax._rangeInitial;
attrs[ax._name + '.range[0]'] = rangeInitial[0];
attrs[ax._name + '.range[1]'] = rangeInitial[1];
}
}
}
}
Expand Down Expand Up @@ -56806,6 +56811,7 @@ var cleanNumber = Lib.cleanNumber;
var ms2DateTime = Lib.ms2DateTime;
var dateTime2ms = Lib.dateTime2ms;
var ensureNumber = Lib.ensureNumber;
var isArrayOrTypedArray = Lib.isArrayOrTypedArray;

var numConstants = _dereq_('../../constants/numerical');
var FP_SAFE = numConstants.FP_SAFE;
Expand Down Expand Up @@ -56937,40 +56943,11 @@ module.exports = function setConvert(ax, fullLayout) {

function setMultiCategoryIndex(arrayIn, len) {
var arrayOut = new Array(len);
var i;

// [ [arrayIn[0][i], arrayIn[1][i]], for i .. len ]
var tmp = new Array(len);
// [ [cnt, {$cat: index}], for j .. arrayIn.length ]
var seen = [[0, {}], [0, {}]];

if(Lib.isArrayOrTypedArray(arrayIn[0]) && Lib.isArrayOrTypedArray(arrayIn[1])) {
for(i = 0; i < len; i++) {
var v0 = arrayIn[0][i];
var v1 = arrayIn[1][i];
if(isValidCategory(v0) && isValidCategory(v1)) {
tmp[i] = [v0, v1];
if(!(v0 in seen[0][1])) {
seen[0][1][v0] = seen[0][0]++;
}
if(!(v1 in seen[1][1])) {
seen[1][1][v1] = seen[1][0]++;
}
}
}

tmp.sort(function(a, b) {
var ind0 = seen[0][1];
var d = ind0[a[0]] - ind0[b[0]];
if(d) return d;

var ind1 = seen[1][1];
return ind1[a[1]] - ind1[b[1]];
});
}

for(i = 0; i < len; i++) {
arrayOut[i] = setCategoryIndex(tmp[i]);
for(var i = 0; i < len; i++) {
var v0 = (arrayIn[0] || [])[i];
var v1 = (arrayIn[1] || [])[i];
arrayOut[i] = getCategoryIndex([v0, v1]);
}

return arrayOut;
Expand Down Expand Up @@ -57119,6 +57096,56 @@ module.exports = function setConvert(ax, fullLayout) {
if(Array.isArray(v) || (typeof v === 'string' && v !== '')) return v;
return ensureNumber(v);
};

ax.setupMultiCategory = function(fullData) {
var traceIndices = ax._traceIndices;
var i, j;

// [ [cnt, {$cat: index}], for 1,2 ]
var seen = ax._multicatSeen = [[0, {}], [0, {}]];
// [ [arrayIn[0][i], arrayIn[1][i]], for i .. N ]
var list = ax._multicatList = [];

for(i = 0; i < traceIndices.length; i++) {
var trace = fullData[traceIndices[i]];

if(axLetter in trace) {
var arrayIn = trace[axLetter];
var len = trace._length || Lib.minRowLength(arrayIn);

if(isArrayOrTypedArray(arrayIn[0]) && isArrayOrTypedArray(arrayIn[1])) {
for(j = 0; j < len; j++) {
var v0 = arrayIn[0][j];
var v1 = arrayIn[1][j];

if(isValidCategory(v0) && isValidCategory(v1)) {
list.push([v0, v1]);

if(!(v0 in seen[0][1])) {
seen[0][1][v0] = seen[0][0]++;
}
if(!(v1 in seen[1][1])) {
seen[1][1][v1] = seen[1][0]++;
}
}
}
}
}
}

list.sort(function(a, b) {
var ind0 = seen[0][1];
var d = ind0[a[0]] - ind0[b[0]];
if(d) return d;

var ind1 = seen[1][1];
return ind1[a[1]] - ind1[b[1]];
});

for(i = 0; i < list.length; i++) {
setCategoryIndex(list[i]);
}
};
}

// find the range value at the specified (linear) fraction of the axis
Expand Down Expand Up @@ -61674,9 +61701,9 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
};

plots.doCalcdata = function(gd, traces) {
var axList = axisIDs.list(gd),
fullData = gd._fullData,
fullLayout = gd._fullLayout;
var axList = axisIDs.list(gd);
var fullData = gd._fullData;
var fullLayout = gd._fullLayout;

var trace, _module, i, j;

Expand Down Expand Up @@ -61729,7 +61756,7 @@ plots.doCalcdata = function(gd, traces) {
);
}

clearAxesCalc(axList);
setupAxisCategories(axList, fullData);

var hasCalcTransform = false;

Expand Down Expand Up @@ -61767,7 +61794,7 @@ plots.doCalcdata = function(gd, traces) {
}

// clear stuff that should recomputed in 'regular' loop
if(hasCalcTransform) clearAxesCalc(axList);
if(hasCalcTransform) setupAxisCategories(axList, fullData);

function calci(i, isContainer) {
trace = fullData[i];
Expand Down Expand Up @@ -61825,9 +61852,13 @@ plots.doCalcdata = function(gd, traces) {
Registry.getComponentMethod('errorbars', 'calc')(gd);
};

function clearAxesCalc(axList) {
function setupAxisCategories(axList, fullData) {
for(var i = 0; i < axList.length; i++) {
axList[i].clearCalc();
var ax = axList[i];
ax.clearCalc();
if(ax.type === 'multicategory') {
ax.setupMultiCategory(fullData);
}
}
}

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 fc0ba5d

Please sign in to comment.