Socket
Socket
Sign inDemoInstall

d3-gauge-chart

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    d3-gauge-chart

A re-creation of Google Charts's Gauge chart using D3. Only the basics are included: a label and a value.


Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Install size
13.7 kB
Created
Weekly downloads
 

Readme

Source

Google-style Gauge Chart with D3

Three gauges showing a sampel of the project. One showing Memory at 73. Another showing CPU at 80. The last showing Network at 62.

A re-creation of Google Charts's Gauge chart using D3. Only the basics are included: a label and a value.

Installation

  1. Include D3: <script src="https://d3js.org/d3.v5.min.js"></script>
  2. Include JS: <script src="https://unpkg.com/d3-gauge-chart"></script>
  3. Include CSS: <link rel="stylesheet" href="https://unpkg.com/d3-gauge-chart/d3-gauge-chart.css">

Usage

  1. Create a new SVG element in your HTML. Make sure it has an id, width, and height. For best results, make it square.

  2. Call the function:

gaugeChart({
  el: '#chart',
  label: 'Memory',
  value: 73,
  min: 0,   // optional
  max: 100, // optional
});

FAQs

Last updated on 26 Jan 2019

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