@thisisbarney/dynamic-scatterplot-layer

1.3.5 • Public • Published

@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.

Readme

Keywords

Package Sidebar

Install

npm i @thisisbarney/dynamic-scatterplot-layer

Weekly Downloads

0

Version

1.3.5

License

ISC

Unpacked Size

19.4 kB

Total Files

7

Last publish

Collaborators

  • thisisbarney