4.0.0 • Published 4 years ago

@kiranbandi/snapshot v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

visualization-snapshot

A state management system for implicit and explicit re-visitation in state based visualizations and dashboards.

Install the package

npm install @kiranbandi/snapshot

Import the required functions

import { initializeSnapshot, updateSnapshot } from '@kiranbandi/snapshot';

Set the class 'snapshot' on the canvas or svg element that you want to be stored as a thumbnail in each snapshot.

Then initialize snapshot by setting the automatic timer mode and interval (milliseconds), thumbnail options such as its class name, size and type and finally a callback that gets called with the data in the snapshot, that needs to be handled by you to update the visualization

  initializeSnapshot(true, 1000,
    {
    'class': '.snapshot',
    'type': 'svg',
    'size': { 'width': 100, 'height': 100 }
    },
    (data) => { // update visualization with new data });

Finally call update snapshot everytime data to the chart is being updated so that snapshot module can access the latest available data

updateSnapshot(data);

4.0.0

4 years ago

3.0.0

4 years ago

2.0.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.0.1

4 years ago