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

react-gauge-ultimate

v1.0.4

Published

Powerful gauge chart for React

Downloads

51

Readme

react-gauge-ultimate

Powerful gauge chart for React

NPM JavaScript Style Guide react-gauge-ultimate Banner

Install

npm i react-gauge-ultimate

or

yarn add react-gauge-ultimate

Usage

import React from 'react'

import { Gauge } from 'react-gauge-ultimate'
import 'react-gauge-ultimate/dist/index.css'

const App = () => {
  return (
    <Gauge
      id='gauge id'
      className='Gauge'
      label='label text'
      percent={1}
      darkMode={false}
    />
  )
}

export default App

API

Warning: Do not use the same id for multiple charts, as it will put multiple charts in the same container

| Name | PropType | Description | Default value | | --------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------- | | id | PropTypes.string.isRequired | Used for the identification of the div surrounding the chart | | | className | PropTypes.string | Add className to the div container | | | style | PropTypes.object | Add style to the div container | { width: '100%' } | | darkMode | PropTypes.bool | Set dark mode style to Gauge | false | | marginInPercent | PropTypes.number | Margin for the chart inside the containing SVG element | 0.05 | | cornerRadius | PropTypes.number | Corner radius for the elements in the chart | 6 | | nrOfLevels | PropTypes.number | The number of elements displayed in the arc | 3 | | percent | PropTypes.number | The number where the pointer should point to (between 0 and 1) | 0.4 | | label | PropTypes.string | The text that displays above the percent | '' | | arcPadding | PropTypes.number | The distance between the elements in the arc | 0.05 | | arcWidth | PropTypes.number | The thickness of the arc | 0.2 | | colors | PropTypes.array | An array of colors in HEX format displayed in the arc | ["#00FF00", "#FF0000"] | | textColor | PropTypes.string | The color of the text | "#FFFFFF" | | needleColor | PropTypes.string | The color of the needle triangle | "#464A4F" | | needleBaseColor | PropTypes.string | The color of the circle at the base of the needle | "#464A4F" | | hideText | PropTypes.bool | Whether or not to hide the percentage display | false | | arcsLength | PropTypes.array | An array specifying the length of each individual arc. If this prop is set, the nrOfLevels prop will have no effect | none | | animate | PropTypes.bool | Whether or not to animate the needle when loaded | true | | animDelay | PropTypes.number | Delay in ms before starting the needle animation | 500 | | animateDuration | PropTypes.number | Duration in ms for the needle animation | 3000 | | formatTextValue | PropTypes.func | Format you own text value (example: value => value+'%') | null |

License

MIT © boof-tech