Skip to content

Commit a339745

Browse files
committed
Update comments
1 parent b68266b commit a339745

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

example/connected-points.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ const resizeHandler = () => {
7676
window.addEventListener('resize', resizeHandler);
7777

7878
const generatePoints = (num) => {
79-
const numPointsPerGroup = Math.round(num / 3); // 12.000 / 3 => 4000
80-
const numPointsPerStep = Math.round(numPointsPerGroup / 5); // 4000 / 5 => 800
81-
// 800 * 3 => 2400
79+
const numPointsPerGroup = Math.round(num / 3); // 9.000 / 3 => 3000
80+
const numPointsPerStep = Math.round(numPointsPerGroup / 5); // 3000 / 5 => 600
81+
// 600 * 3 => 1800 (lines)
8282

8383
const outPoints = [];
8484

@@ -164,6 +164,7 @@ resetEl.addEventListener('click', resetClickHandler);
164164

165165
scatterplot.set({
166166
colorBy: 'valueZ',
167+
sizeBy: 'valueW',
167168
pointColor: [
168169
[255, 128, 203, 128],
169170
[87, 199, 255, 128],
@@ -189,9 +190,8 @@ scatterplot.set({
189190
pointConnectionOpacity: Array(10)
190191
.fill()
191192
.map((v, i) => (i + 1) / 100),
192-
sizeBy: 'valueW',
193193
pointConnectionSizeBy: 'valueW',
194-
pointConnectionSize: Array(12)
194+
pointConnectionSize: Array(18)
195195
.fill()
196196
.map((v, i) => (i + 1) / 2),
197197
});

0 commit comments

Comments
 (0)