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

simple-react-d3-guage-chart

v1.0.3

Published

simple guage chart for react made using d3

Downloads

33

Readme

simple-react-d3-guage-chart

simple guage chart for react made using d3

NPM JavaScript Style Guide

Install

npm install --save simple-react-d3-guage-chart

Usage

import React, { Component } from 'react'

import SimpleGuageChart from 'simple-react-d3-guage-chart'
import 'simple-react-d3-guage-chart/dist/index.css'

class Example extends Component {
  render() {
    return <SimpleGuageChart id={"guage-01"} value={40}/>
  }
}

Examples

simple-react-d3-guage-chart

Properties

| Name | PropType | Description | Default value | |-----------------|-----------------------------|----------------------------------------------------------------|------------------------| | value | PropTypes.string.isRequired | Used to Display the value below the pointer | | | id | PropTypes.string.isRequired | Unique ID for graph | | | size | PropTypes.number | Size of The chart, Min Value is 200px | 300 | | minValue | PropTypes.number | Minimum value on the scale | 0 | | maxValue | PropTypes.number | Maximum value on the scale | 100 | | minAngle | PropTypes.number | Minimum angle at which the pointer starts. You need to provide both min and max angle. Min angle should always be less than max angle.| -120 | | maxAngle | PropTypes.number | Maximum angle at which the pointer ends | 120 | | majorTicks | PropTypes.number | Number of Expected Ticks, This will not be same as ticks appearing in graph, This varies based on d3 scale for min and max value. | 7 | | pointerWidth | PropTypes.number | Width of pointer. Diameter at the starting of pointer. Should be in between 2 to 10| 6 | | pointerLength | PropTypes.number | Pointer length Percentage, Should be in between 0.3 and 1 | 0.7 | | mainRingWidth | PropTypes.number | Thickness of ring.should be minimum 1 | 3 | | ticksRingWidth | PropTypes.number | Height of Ticks. Should be in between 0 and 30 | 15 | | tickColors | PropTypes.array | Color of ticks. Should be an array of length 2. | ["#d92121", "#12af5a"] | | pointerColor | PropTypes.string | Color of Pointer | "#ff0500" | | arcColor | PropTypes.string | Color of Main Arc | "#b3b3b3" | | tickFontColor | PropTypes.string | Color of Text on scale | "#666" | | fontColor | PropTypes.string | Color of Value presented on scale | "#666" |

License

MIT © bhanupradeep7