Skip to content

Commit 9f30e0a

Browse files
committed
use ax._gridVals to built WebGL splom grid line data
- ... that is instead of ax._vals - ax._gridVals has the grid line of the axis ends filtered out, which leads here to less rendered line - improving perf w/o generating a diff in the baselines.
1 parent 184db74 commit 9f30e0a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: src/traces/splom/base_plot.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ function makeGridData(gd) {
124124
var sp = fullLayout._plots[k];
125125
var xa = sp.xaxis;
126126
var ya = sp.yaxis;
127-
var xVals = xa._vals;
128-
var yVals = ya._vals;
127+
var xVals = xa._gridVals;
128+
var yVals = ya._gridVals;
129129
// ya.l2p assumes top-to-bottom coordinate system (a la SVG),
130130
// we need to compute bottom-to-top offsets and slopes:
131131
var yOffset = gs.b + ya.domain[0] * gs.h;

Diff for: test/jasmine/tests/splom_test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -702,26 +702,26 @@ describe('Test splom interactions:', function() {
702702
}
703703

704704
Plotly.plot(gd, fig).then(function() {
705-
_assert([1198, 16678, 3358, 118]);
705+
_assert([1198, 16558, 3358, 118]);
706706
return Plotly.restyle(gd, 'showupperhalf', false);
707707
})
708708
.then(function() {
709-
_assert([1198, 8488, 1768, 4]);
709+
_assert([1198, 8476, 1768, 4]);
710710
return Plotly.restyle(gd, 'diagonal.visible', false);
711711
})
712712
.then(function() {
713-
_assert([1138, 7654, 1600]);
713+
_assert([1138, 7534, 1600]);
714714
return Plotly.restyle(gd, {
715715
showupperhalf: true,
716716
showlowerhalf: false
717717
});
718718
})
719719
.then(function() {
720-
_assert([8188, 112, 1588]);
720+
_assert([7966, 112, 1588]);
721721
return Plotly.restyle(gd, 'diagonal.visible', true);
722722
})
723723
.then(function() {
724-
_assert([58, 9022, 1756, 118]);
724+
_assert([58, 8908, 1756, 118]);
725725
return Plotly.relayout(gd, {
726726
'xaxis.gridcolor': null,
727727
'xaxis.gridwidth': null,
@@ -732,7 +732,7 @@ describe('Test splom interactions:', function() {
732732
.then(function() {
733733
// one batch for all 'grid' lines
734734
// and another for all 'zeroline' lines
735-
_assert([9082, 1876]);
735+
_assert([8968, 1876]);
736736
})
737737
.catch(failTest)
738738
.then(done);

0 commit comments

Comments
 (0)