plotly.js 2.8.1 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +3 -3
- package/dist/README.md +21 -21
- package/dist/plotly-basic.js +9 -3
- package/dist/plotly-basic.min.js +2 -2
- package/dist/plotly-cartesian.js +12 -5
- package/dist/plotly-cartesian.min.js +2 -2
- package/dist/plotly-finance.js +12 -5
- package/dist/plotly-finance.min.js +2 -2
- package/dist/plotly-geo-assets.js +2 -2
- package/dist/plotly-geo.js +2 -2
- package/dist/plotly-geo.min.js +2 -2
- package/dist/plotly-gl2d.js +5 -4
- package/dist/plotly-gl2d.min.js +2 -2
- package/dist/plotly-gl3d.js +2 -2
- package/dist/plotly-gl3d.min.js +2 -2
- package/dist/plotly-mapbox.js +2 -2
- package/dist/plotly-mapbox.min.js +2 -2
- package/dist/plotly-strict.js +12 -5
- package/dist/plotly-strict.min.js +2 -2
- package/dist/plotly-with-meta.js +12 -5
- package/dist/plotly.js +12 -5
- package/dist/plotly.min.js +2 -2
- package/package.json +1 -1
- package/src/traces/bar/plot.js +7 -1
- package/src/traces/histogram/calc.js +3 -2
- package/src/version.js +1 -1
package/package.json
CHANGED
package/src/traces/bar/plot.js
CHANGED
|
@@ -631,10 +631,11 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
|
|
|
631
631
|
if(!texttemplate) return '';
|
|
632
632
|
var isWaterfall = (trace.type === 'waterfall');
|
|
633
633
|
var isFunnel = (trace.type === 'funnel');
|
|
634
|
+
var isHorizontal = trace.orientation === 'h';
|
|
634
635
|
|
|
635
636
|
var pLetter, pAxis;
|
|
636
637
|
var vLetter, vAxis;
|
|
637
|
-
if(
|
|
638
|
+
if(isHorizontal) {
|
|
638
639
|
pLetter = 'y';
|
|
639
640
|
pAxis = ya;
|
|
640
641
|
vLetter = 'x';
|
|
@@ -669,6 +670,11 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
|
|
|
669
670
|
var pt = {};
|
|
670
671
|
appendArrayPointValue(pt, trace, cdi.i);
|
|
671
672
|
|
|
673
|
+
if(pt.x === undefined) pt.x = isHorizontal ? obj.value : obj.label;
|
|
674
|
+
if(pt.y === undefined) pt.y = isHorizontal ? obj.label : obj.value;
|
|
675
|
+
if(pt.xLabel === undefined) pt.xLabel = isHorizontal ? obj.valueLabel : obj.labelLabel;
|
|
676
|
+
if(pt.yLabel === undefined) pt.yLabel = isHorizontal ? obj.labelLabel : obj.valueLabel;
|
|
677
|
+
|
|
672
678
|
if(isWaterfall) {
|
|
673
679
|
obj.delta = +cdi.rawS || cdi.s;
|
|
674
680
|
obj.deltaLabel = formatNumber(obj.delta);
|
|
@@ -15,8 +15,9 @@ var getBinSpanLabelRound = require('./bin_label_vals');
|
|
|
15
15
|
function calc(gd, trace) {
|
|
16
16
|
var pos = [];
|
|
17
17
|
var size = [];
|
|
18
|
-
var
|
|
19
|
-
var
|
|
18
|
+
var isHorizontal = trace.orientation === 'h';
|
|
19
|
+
var pa = Axes.getFromId(gd, isHorizontal ? trace.yaxis : trace.xaxis);
|
|
20
|
+
var mainData = isHorizontal ? 'y' : 'x';
|
|
20
21
|
var counterData = {x: 'y', y: 'x'}[mainData];
|
|
21
22
|
var calendar = trace[mainData + 'calendar'];
|
|
22
23
|
var cumulativeSpec = trace.cumulative;
|
package/src/version.js
CHANGED