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

vue-gauge-chart

v1.0.5

Published

A customizable Vue.js component for gauge charts.

Downloads

98

Readme

Vue Gauge Chart

npm license downloads Vue.js Vue.js Img A Vue.js component for creating interactive gauge charts. This component allows you to visualize values in a circular format, making it ideal for dashboards and data visualization.

Features

  • Customizable gauge ranges
  • Dynamic value updates
  • Smooth animations for pointer movement and segment transitions
  • Easy integration with Vue.js applications

Installation

To install the Vue Gauge Chart component, use npm:

npm install vue-gauge-chart

Usage Basic Usage First, import the component into your Vue application:

import Vue from 'vue';
import GaugeChart from 'vue-gauge-chart';

Vue.component('gauge-chart', GaugeChart);

Example You can use the component in your Vue templates as follows:

<template>
  <div id="app">
    <gauge-chart 
      :value="75" 
      :minValue="0" 
      :midValue="75" 
      :maxValue="150" 
      :startAngle="0" 
      :endAngle="180" 
      :chartWidth="200" 
      innerLabel="Performance" 
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
      // Dynamic data can be set here
    };
  }
};
</script>

Props The GaugeChart component accepts the following props:

| Prop | Type | Default | Description | |-------------|----------|---------|--------------------------------------------------------| | value | Number | Required| The current value to display on the gauge. | | minValue | Number | 0 | The minimum value of the gauge. | | midValue | Number | 75 | The midpoint value of the gauge. | | maxValue | Number | 150 | The maximum value of the gauge. | | startAngle| Number | 0 | The starting angle of the gauge in degrees. | | endAngle | Number | 180 | The ending angle of the gauge in degrees. | | chartWidth| Number | 200 | The width of the chart in pixels. | | innerLabel| String | "Value" | The label displayed inside the gauge. |

Customization You can customize the appearance of the gauge by modifying the component’s CSS. The default styles are located in the section of the GaugeChart.vue file.

Example CSS Customization

.gauge-pointer {
  transition: transform 0.5s ease-in-out; /* Smooth pointer movement */
  transform-origin: 100px 100px; /* Origin for rotation */
}

.gauge-segment {
  transition: stroke 0.5s ease-in-out; /* Smooth color transition for segments */
}

Development Running Locally To run the component locally for development:

  1. Clone the repository:
git clone https://github.com/mmuneesm99/vue-gauge-chart.git
cd vue-gauge-chart
  1. Install the dependencies:
npm install
  1. Run the development server:
npm run dev
  1. Building for Production

To build the component for production:

npm run build

This will create a dist folder containing the production-ready files.

License This project is licensed under the MIT License. See the LICENSE file for details.

Author : Muhammed Munees

Notes

  • Replace https://github.com/mmuneesm99/vue-gauge-chart.git with your actual repository URL.
  • Update the link in the "Author" section with your personal or professional website.
  • Adjust or expand on any sections based on additional features or changes in your component.