{"id":16125749,"url":"https://github.com/dy/gauge","last_synced_at":"2025-09-12T21:33:09.407Z","repository":{"id":57204757,"uuid":"29397234","full_name":"dy/gauge","owner":"dy","description":"Circular gauge indicator component","archived":false,"fork":false,"pushed_at":"2015-01-18T07:13:18.000Z","size":216,"stargazers_count":15,"open_issues_count":4,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-29T00:12:21.461Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dy.github.io/gauge/test","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-17T16:34:28.000Z","updated_at":"2024-01-09T10:26:23.000Z","dependencies_parsed_at":"2022-09-18T01:00:59.972Z","dependency_job_id":null,"html_url":"https://github.com/dy/gauge","commit_stats":null,"previous_names":["dfcreative/gauge"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fgauge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fgauge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fgauge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fgauge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dy","download_url":"https://codeload.github.com/dy/gauge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232792146,"owners_count":18577261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T21:31:29.299Z","updated_at":"2025-01-06T21:53:39.014Z","avatar_url":"https://github.com/dy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gauge [![Code Climate](https://codeclimate.com/github/dfcreative/gauge/badges/gpa.svg)](https://codeclimate.com/github/dfcreative/gauge) ![size](https://img.shields.io/badge/size-2.4kb-brightgreen.svg) \u003ca href=\"UNLICENSE\"\u003e\u003cimg src=\"http://upload.wikimedia.org/wikipedia/commons/6/62/PD-icon.svg\" width=\"20\"/\u003e\u003c/a\u003e\n\nA simple circular gauge indicator component.\n\n![Preview](https://cdn.rawgit.com/dfcreative/gauge/master/preview.png)\n\n[Live demo](https://cdn.rawgit.com/dfcreative/gauge/d9bcf65f3bf0a4e6e52fb8add5bc6f5dc3bba1c5/test/index.html).\n\n\n## Installation\n\n`$ npm install component-gauge`\n\nOr use standalone browser version [gauge.min.js](gauge.min.js), using global `Gague` class.\n\nDon’t forget to include [index.css](gauge.min.js) and [arrow.svg](arrow.svg).\n\n\n## Example\n\n```js\nvar Gauge = require('component-gauge');\nvar q = require('query');\n\nvar gauge = new Gauge(q('.gauge'), options);\n```\n\n\n# API\n\n### new Gauge(el, options)\n\nCreate a new Gauge component.\n\n### Gauge.prototype.update()\n\nUpdate gauge rings, marks \u0026 labels position.\n\n### Gauge.prototype.value\n\nCurrent gauge percent value, `0..100`.\n\n\n# Options\n\n| Param | Default | Description |\n|---|---|---|\n| `angle` | `[150, 390]` | Start and end angles defining gauge’s aperture |\n| `values` | `{0: 'start', 100: 'end'}` | Dict of labels corresponding to percentage values |\n| `colors` | `{0:'gray', 70:'orange', 90:'red'}` | Dict of colors corresponding to percentage values |\n| `marks` | `[0,10,..100]` | List of marks, corresponding to percentage |\n| `value` | `0` | Initial value |\n\n\n# CSS\n\nThere are a bunch of styles you can tack to adjust gauge view. Look into [index.css](index.css).\nFor example, you can adjust arrow shape and visibility, inset/outset of values and marks.\n\n\n[![NPM](https://nodei.co/npm/component-gauge.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/component-gauge/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Fgauge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdy%2Fgauge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Fgauge/lists"}