1.2.12-rc3 • Published 4 years ago

vgauge v1.2.12-rc3

Weekly downloads
823
License
MIT
Repository
github
Last release
4 years ago

vgauge npm

A Vue Wrapper to GaugeJS

If this package helps you, consider buying me a beer 😁

paypal

Play

Live Demo

Installing

npm i vgauge --save

or

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vgauge@latest"></script>

Usage

By Importing

import VGauge from 'vgauge';

export default {
  components: {
    VGauge
  },
  data() {
    return {
      value: 35
    };
  }
};
<v-gauge :value="value" />

By Including

<div id="app">
  <h3>Will not stop at 100</h3>
  <v-gauge :value="x" top></v-gauge>
  <h3>Will stop at 100</h3>
  <v-gauge :value="y" unit="%"></v-gauge>
</div>
<script>
  var app = new Vue({
    el: '#app',
    data: {
      x: 0,
      y: 0
    },
    mounted() {
      setInterval(() => {
        this.x += 4;
      }, 1000);
      setInterval(() => {
        if (this.y < 100) this.y += 5;
      }, 1000);
    }
  });
</script>

Props

You can use the following props

NameDescriptionTypeDefault
optionsGaugeJS render options, check gaugejs APIObjectBasic gaugejs Object
donutRenders a donut instead of a gauge #3Booleanfalse
heightheight of the gauge in pixelsString200px
widthwidth of the gauge in pixelsString200px
unitunit to show after valueString''
initialValueInitial value to display on the GaugeNumber0
valueValue to display/watchNumber50
minValueMin value for the gauge to displayNumber0
maxValueMax value for the gauge to displayNumber100
decimalPlaceShow decimal place values to which extentNumber0
topTo have the gauge value on top of the gaugeBooleanfalse
gaugeValueClassClass to apply to gauge value (Must use /deep/ in css selector)String*
animationSpeedAnimation speed for gaugeNumber10

Authors

License

This project is licensed under the MIT License

Acknowledgments

1.2.12-rc3

4 years ago

1.2.12-rc2

4 years ago

1.2.12-rc1

4 years ago

1.2.12

4 years ago

1.2.11

4 years ago

1.2.10

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.8-rc1

4 years ago

1.2.6

5 years ago

1.2.5-rc.2

5 years ago

1.2.5-rc.1

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago