Skip to content

Commit ae135dd

Browse files
committed
PR feedback- split bounds to xbounds / ybounds
1 parent d53c69b commit ae135dd

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/traces/pointcloud/attributes.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,25 @@ module.exports = {
2525
valType: 'data_array',
2626
description: [
2727
'A sequential value, 0..n, supply it to avoid creating this array inside plotting.',
28+
'If specified, it must be a typed `Int32Array` array.',
2829
'Its length must be equal to or greater than the number of points.',
2930
'For the best performance and memory use, create one large `indices` typed array',
3031
'that is guaranteed to be at least as long as the largest number of points during',
3132
'use, and reuse it on each `Plotly.restyle()` call.'
3233
].join(' ')
3334
},
34-
bounds: {
35+
xbounds: {
3536
valType: 'data_array',
3637
description: [
37-
'Specify `bounds` in the shape of `[xMin, yMin, xMax, yMax] to avoid looping through',
38-
'the `xy` typed array.'
38+
'Specify `xbounds` in the shape of `[xMin, xMax] to avoid looping through',
39+
'the `xy` typed array. Use it in conjunction with `xy` and `ybounds` for the performance benefits.'
40+
].join(' ')
41+
},
42+
ybounds: {
43+
valType: 'data_array',
44+
description: [
45+
'Specify `ybounds` in the shape of `[yMin, yMax] to avoid looping through',
46+
'the `xy` typed array. Use it in conjunction with `xy` and `xbounds` for the performance benefits.'
3947
].join(' ')
4048
},
4149
text: scatterglAttrs.text,

src/traces/pointcloud/defaults.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor) {
2020

2121
coerce('x');
2222
coerce('y');
23-
coerce('bounds');
23+
24+
coerce('xbounds');
25+
coerce('ybounds');
2426

2527
if(traceIn.xy && traceIn.xy instanceof Float32Array) {
2628
traceOut.xy = traceIn.xy;

0 commit comments

Comments
 (0)