npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

visconnect

v1.2.2

Published

Collaborate on data visualizations! Demo at https://michaschwab.github.io/VisConnect/

Downloads

26

Readme

VisConnect

Live collaboration for web based visualizations. Events, such as clicking, are synchronized across collaborators. For more information check out the website at visconnect.us.


Installation

To use VisConnect, simply include the the script tag for VisConnect.

<script src="https://unpkg.com/visconnect@latest/visconnect-bundle.js"></script>

Basic Usage

After including the script tags in your HTML, VisConnect will automatically inject the collaboration interface. To start collaborating click the VisConnect logo on the bottom right and a custom link will be copied to your clipboard. Send this link to anyone you want and wait for them to join. Once connected all your interaction events one SVG elements should be synchronized!

Advanced Usage

To enable VisConnect to work with as many use cases as possible we’ve included a number of optional settings and methods for developers to leverage.

UI Synchronization

To synchronize events on non-SVG (e.g. HTML UI) include the collaboration attribute in your Body tag.

<body collaboration>

Example

Lock System Bypass

VisConnect uses a distributed lock manager to ensure DOM elements can only be manipulated by one client at a time. To disable the lock manager, and allow all events to be synchronized as soon as they happen, set the collaboration attribute to live.

<body collaboration='live'>

Ignoring Events

By default, Visconnect listens to all standard JavaScript events. If you want to ignore particular events you can list them in the Body tag with the ignore-events attribute.

<body ignore-events='mousedown, mouseup, mousemove'>

Custom Events

VisConnect can even synchronize your custom events! Custom events can even send a payload over the network. To sync custom events add them to the Body tag with the custom-events attribute.

<body custom-events='myEvent'>

const myEvent = new CustomEvent ('myEvent', { payload: data });

document.body.addEventListener('myEvent', (e) => { console.log(e.payload) });

Example

Collaborative Methods

Commonly used visualiation methods are not made with collaboration in mind and do not work well with VisConnect. VisConnect provides drop in replacements for several of these methods to improve compatibility.

  1. vc.random(): Seeded drop in replacement for Math.random()
  2. vc.drag(): Drop in replacement for d3.drag() Example
  3. vc.brush(): Drop in replacement for d3.brush() Example
  4. vc.lasso(): Custom lasso implmentation for VisConnect Example