Skip to content

Commit 042cc82

Browse files
committed
rm bar (now useless) 'placeholder' logic
- see #1369 for why that was needed.
1 parent 0144f06 commit 042cc82

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

src/traces/bar/set_positions.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ module.exports = function setPositions(gd, plotinfo) {
3838
fullTrace.visible === true &&
3939
Registry.traceIs(fullTrace, 'bar') &&
4040
fullTrace.xaxis === xa._id &&
41-
fullTrace.yaxis === ya._id &&
42-
!calcTraces[i][0].placeholder
41+
fullTrace.yaxis === ya._id
4342
) {
4443
if(fullTrace.orientation === 'h') {
4544
calcTracesHorizontal.push(calcTraces[i]);

test/jasmine/tests/bar_test.js

-17
Original file line numberDiff line numberDiff line change
@@ -703,23 +703,6 @@ describe('Bar.setPositions', function() {
703703
expect(Axes.getAutoRange(ya)).toBeCloseToArray([-1.11, 1.11], undefined, '(ya.range)');
704704
});
705705

706-
it('should skip placeholder trace in position computations', function() {
707-
var gd = mockBarPlot([{
708-
x: [1, 2, 3],
709-
y: [2, 1, 2]
710-
}, {
711-
x: [null],
712-
y: [null]
713-
}]);
714-
715-
expect(gd.calcdata[0][0].t.barwidth).toEqual(0.8);
716-
717-
expect(gd.calcdata[1][0].x).toBe(false);
718-
expect(gd.calcdata[1][0].y).toBe(false);
719-
expect(gd.calcdata[1][0].placeholder).toBe(true);
720-
expect(gd.calcdata[1][0].t.barwidth).toBeUndefined();
721-
});
722-
723706
it('works with log axes (grouped bars)', function() {
724707
var gd = mockBarPlot([
725708
{y: [1, 10, 1e10, -1]},

0 commit comments

Comments
 (0)