Skip to content

Commit 01b4836

Browse files
committed
clear special handling for bars and scatter
1 parent 51eded4 commit 01b4836

File tree

4 files changed

+1
-13
lines changed

4 files changed

+1
-13
lines changed

src/components/fx/hover.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,10 +1994,7 @@ function getCoord(axLetter, winningPoint, fullLayout) {
19941994
var val = winningPoint[axLetter + 'Val'];
19951995

19961996
if(ax.type === 'category') val = ax._categoriesMap[val];
1997-
else if(ax.type === 'date') {
1998-
var period = winningPoint[axLetter + 'Period'];
1999-
val = ax.d2c(period !== undefined ? period : val);
2000-
}
1997+
else if(ax.type === 'date') val = ax.d2c(val);
20011998

20021999
var cd0 = winningPoint.cd[winningPoint.index];
20032000
if(cd0 && cd0.t && cd0.t.posLetter === ax._id) {

src/traces/bar/hover.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,6 @@ function hoverOnBars(pointData, xval, yval, hovermode, opts) {
179179

180180
var hasPeriod = di.orig_p !== undefined;
181181
pointData[posLetter + 'LabelVal'] = hasPeriod ? di.orig_p : di.p;
182-
if(hasPeriod) {
183-
pointData[posLetter + 'Period'] = di.p;
184-
}
185182

186183
pointData.labelLabel = hoverLabelText(pa, pointData[posLetter + 'LabelVal'], trace[posLetter + 'hoverformat']);
187184
pointData.valueLabel = hoverLabelText(sa, pointData[sizeLetter + 'LabelVal'], trace[sizeLetter + 'hoverformat']);

src/traces/scatter/hover.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) {
112112
hovertemplate: trace.hovertemplate
113113
});
114114

115-
if(trace.xperiodalignment === 'end') pointData.xPeriod = di.x;
116-
if(trace.yperiodalignment === 'end') pointData.yPeriod = di.y;
117-
118115
fillText(di, trace, pointData);
119116
Registry.getComponentMethod('errorbars', 'hoverInfo')(di, trace, pointData);
120117

src/traces/scattergl/hover.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,6 @@ function calcHover(pointData, x, y, trace) {
202202
hovertemplate: di.ht
203203
});
204204

205-
if(trace.xperiodalignment === 'end') pointData2.xPeriod = di.x;
206-
if(trace.yperiodalignment === 'end') pointData2.yPeriod = di.y;
207-
208205
if(di.htx) pointData2.text = di.htx;
209206
else if(di.tx) pointData2.text = di.tx;
210207
else if(trace.text) pointData2.text = trace.text;

0 commit comments

Comments
 (0)