Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3-gauge-chart

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by150%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 26 Jan 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc