Socket
Socket
Sign inDemoInstall

@maslick/karandashee

Package Overview
Dependencies
37
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @maslick/karandashee

nice-looking time series plot for categorical data


Version published
Weekly downloads
22
Maintainers
1
Created
Weekly downloads
 

Readme

Source

karanda-shee

npm (scoped) npm download count License: MIT

time series plot for categorical data

screenshot

Demo

See here.

Features

  • a running plot with bars representing categorical events
  • input: Rx streams (e.g. live websocket or MQTT data)
  • multiple plots on one page
  • leverages d3 v5 and rx-lite
  • browser and node.js friendly

Usage

Include this into your html:

<link rel="stylesheet" href="src/karandashee.css">
<div id="karandasheeGraph"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/5.7.0/d3.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/Reactive-Extensions/RxJS/dist/rx.lite.min.js"></script>
<script src="dist/karandashee.min.js"></script>

Define your data stream (rx-lite):

const items = ["rain", "sunshine", "icy cold", "snow", "thunderstorm", "cloudy", "blizard", "hot", "tsunami"];

const dataObservable = Rx.Observable
    .interval(500)
    .map(x => {
        return {
            item: items[x % items.length],
            timestamp: new Date().getTime(),
        };
    }).share();

Instantiate a Karandashee object:

let karandasheeOptions = {
    graphdiv: "#karandasheeGraph",
    observable: dataObservable,
    key: "item",
    values: items
};

let karandashee = new Karandashee(karandasheeOptions);

Node.js

Karandashee can be used either in the Browser or in the Node.js environment.

License

This project is licenced under the MIT License.

Keywords

FAQs

Last updated on 15 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc