1.3.5 • Published 7 years ago
@thisisbarney/dynamic-scatterplot-layer v1.3.5
@thisisbarney/dynamic-scatterplot-layer
a dynamic scatter plot layer, animating points
import React from 'react';
import DSLayer from '@thisisbarney/dynamic-scatterplot-layer';
const layers = [
new DSLayer({
// parameters same with ScatterplotLayer
id: 'points',
data,
radiusScale: 1,
getRadius: x => 100,
getColor: d => [0, 255, 0],
getPath: d => d.path,
currentTime: time,
maxSpeed: 5,
})
];Key parameters different from ScatterplotLayer is getPath and curentTime,
getPath maps a data row to a path consists of [x, y, time],
currentTime corresponds with time in path.
maxSpeed is used to filter out invalid(too fast) points.