Socket
Socket
Sign inDemoInstall

@pinpoint-fe/scatter-chart

Package Overview
Dependencies
13
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @pinpoint-fe/scatter-chart

Open-source scatter-chart library written in pure JS based on canvas api, Specifically designed for visualizing request and response patterns over time


Version published
Weekly downloads
103
decreased by-23.13%
Maintainers
2
Install size
4.65 MB
Created
Weekly downloads
 

Readme

Source

latest version: v1.5.1

@pinpoint-fe/scatter-chart

  • documentation

🔎 Overview

  • An open-source scatter-chart library written in pure JS based on canvas api
  • Specifically designed for visualizing request and response patterns over time
  • Easy to monitor any unexpected transaction

⚙️ Installation

npm install @pinpoint-fe/scatter-chart

or

yarn add @pinpoint-fe/scatter-chart

🚀 Quick Start

Create your first Scatter Chart

import { ScatterChart } from '@pinpoint-fe/scatter-chart';

const SC = new ScatterChart(
  document.getElementById('scatterWrapper'), 
  {
    axis: {
      x: {
        min: 1669103462000,
        max: 1669103509335,
        tick: {
          format: (value) => `
            ${String(date.getHours()).padStart(2, '0')}:
            ${String(date.getMinutes()).padStart(2, '0')}:
            ${String(date.getSeconds()).padStart(2, '0')}
          `;,
        }
      },
      y: {
        min: 0,
        max: 10000,
        tick: {
          format: (value) => value.toLocaleString(),
        }
      }
    },
    data: [
      {
        type: 'success',
        color: 'rgba(61, 207, 168, 0.5)',
        priority: 1,
      },
      {
        type: 'fail',
        color: 'rgba(235, 71, 71, 0.5)',
        priority: 2,
      },
    ],
    legend: {
      formatLabel: (label) => label.toUpperCase(),
    }
  }
);

SC.render(data);

Parameters

ParamsTypeRequiredDescription
wrapperHTMLElement✔️Wrapper element where chart will be rendered
optionsScatterChartOption✔️ScatterChart options

FAQs

Last updated on 26 Jul 2023

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