{"id":22199617,"url":"https://github.com/hellocomet/vue-svg-gauge","last_synced_at":"2025-04-11T02:22:37.381Z","repository":{"id":37692877,"uuid":"171648951","full_name":"hellocomet/vue-svg-gauge","owner":"hellocomet","description":"Customizable gauge component with gradients and animations for VueJs","archived":false,"fork":false,"pushed_at":"2022-12-09T18:54:46.000Z","size":1423,"stargazers_count":80,"open_issues_count":36,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-18T16:09:32.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hellocomet.github.io/vue-svg-gauge/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hellocomet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-20T10:08:32.000Z","updated_at":"2024-10-22T03:40:19.000Z","dependencies_parsed_at":"2023-01-25T15:46:30.749Z","dependency_job_id":null,"html_url":"https://github.com/hellocomet/vue-svg-gauge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellocomet%2Fvue-svg-gauge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellocomet%2Fvue-svg-gauge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellocomet%2Fvue-svg-gauge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellocomet%2Fvue-svg-gauge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellocomet","download_url":"https://codeload.github.com/hellocomet/vue-svg-gauge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328466,"owners_count":21085324,"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-12-02T15:15:54.216Z","updated_at":"2025-04-11T02:22:37.363Z","avatar_url":"https://github.com/hellocomet.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-svg-gauge\nAn easily customizable gauge for VueJS with gradients and animations\n\n## Demo\nYou can find a demo [here](https://hellocomet.github.io/vue-svg-gauge/)\n\n## Installation\n`npm i vue-svg-gauge --save`\n\n`yarn add -D vue-svg-gauge`\n\n## Import\n\n### ES6\nThe following examples can also be used with CommonJS by replacing ES6-specific syntax with CommonJS equivalents.\n\n```js\nimport Vue from 'vue'\nimport { VueSvgGauge } from 'vue-svg-gauge'\n\nnew Vue({\n  components: {\n    VueSvgGauge,\n  }\n})\n```\n\n### Globals as a pluggin\n```js\nimport Vue from 'vue'\nimport App from './App.vue'\nimport VueSvgGauge from 'vue-svg-gauge'\n\nVue.use(VueSvgGauge)\n\nnew Vue({\n  render: h =\u003e h(App),\n}).$mount('#app')\n\n```\n\n### Globals (via the script tag)\nAdd a script tag pointing to _dist/vue-svg-gauge.min.js_ after adding Vue.\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    ...\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id=\"app\"\u003e\n      \u003cvue-svg-gauge\u003e\u003c/vue-svg-gauge\u003e\n    \u003c/div\u003e\n\n    \u003cscript src=\"path/to/vue.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"path/to/dist/vue-svg-gauge.min.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n      new Vue({\n        el: '#app'\n      })\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Usage\nOnce installed, it can be user in any template as\n```html\n\u003cVueSvgGauge\n  :start-angle=\"-110\"\n  :end-angle=\"110\"\n  :value=\"3\"\n  :separator-step=\"1\"\n  :min=\"0\"\n  :max=\"4\"\n  :gauge-color=\"[{ offset: 0, color: '#347AB0'}, { offset: 100, color: '#8CDFAD'}]\"\n  :scale-interval=\"0.1\"\n/\u003e\n\u003c!--  or  --\u003e\n\u003cvue-svg-gauge\n  :start-angle=\"-110\"\n  :end-angle=\"110\"\n  :value=\"3\"\n  :separator-step=\"0\"\n  :min=\"0\"\n  :max=\"10\"\n  gauge-color=\"#8CDFAD\"\n  :scale-interval=\"0.1\"\n/\u003e\n```\n\n## Props\n\n| Props | Type | Value | Default |\n|---|---|---|---|\n| value | Number | Value of the gauge, must be contained between *min* and *max*. If not, it will be set to min if inferior, or max if superior | 70 |\n| min | Number | Minimum value reachable | 0 |\n| max | Number | Maximum value reachable | 100 |\n| startAngle | Number | Start angle of the gauge. Can go from -360° to 360° but must be smaller than endAngle | -90 |\n| endAngle | Number | End angle of the gauge. Can go from -360° to 360° but must be greater than startAngle | 90 |\n| innerRadius | Number | inner radius that will determine the thickness of the gauge | 60 |\n| separatorStep | Number | Number of steps between each separator (will display a separator each min + (n * separatorStep)). Won't display any if 0 or null | 10 |\n| separatorThickness | Number | Thickness of the separators, unit is in degree | 4 |\n| gaugeColor | String,Array | Color of the gauge, can either be a simple color or a gradient | [{ offset: 0, color: '#347AB0' }, { offset: 100, color: '#8CDFAD' }] |\n| baseColor | String | Color of the empty gauge | #DDDDDD |\n| scaleInterval | Number | Interval between the scale line, based on min and max. Won't display any if 0 or null | 5 |\n| transitionDuration | Number | Transition duration time in ms. If set to `0`, there will be no transition | 1500 |\n| easing | String | Animation easing option | Circular.Out |\n\n_Notes_ :\n- the reference angle is 0 on top of the gauge.\n- you can find the documentation about the different animation functions [here](https://github.com/tweenjs/tween.js/blob/master/docs/user_guide.md)\n\n## Slot\nThere is a main _slot_ allowing you to display any kind of html you want in your gauge.\n\n### Example\n```html\n\u003cVueSvgGauge\n  :start-angle=\"-110\"\n  :end-angle=\"110\"\n  :value=\"random\"\n  :separator-step=\"20\"\n  :scale-interval=\"10\"\n  :inner-radius=\"80\"\n\u003e\n  \u003cdiv class=\"inner-text\"\u003e\n    \u003cspan\u003eLet's make this \u003cb\u003efun\u003c/b\u003e !\u003c/span\u003e\n  \u003c/div\u003e\n\u003c/VueSvgGauge\u003e\n```\n\n```css\n.inner-text {\n  // allow the text to take all the available space in the svg on top of the gauge\n  height: 100%;\n  width: 100%;\n\n  span {\n    max-width: 100px;\n    color: red;\n    // ...\n  }\n}\n```\n\n## Dependencies\nYou will need to install ```vue ~2.5.22``` to use this package properly\n\nAlso vue-svg-gauge relies on the [**tweenJs**](https://github.com/tweenjs/tween.js/) library for animations.\n\nMade with ❤️ at [**comet**](https://comet.co/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellocomet%2Fvue-svg-gauge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellocomet%2Fvue-svg-gauge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellocomet%2Fvue-svg-gauge/lists"}