All Components

Gauges Overview

The Gauge provide a set of components for building common gauge types.

Installation

To initialize the Gauges, either:

Initializing from CDN

The following example demonstrates how to initialize the LinearGauge and RadialGauge components by using the CDN services. To access all CDN references, open the sample in Plunker.

<div id="vueapp" class="vue-app row example-wrapper">
    <div class="col-sm-12 col-md-5 example-col">
           <kendo-lineargauge :gauge-area-width="300"
                              :scale-major-unit="20"
                              :scale-minor-unit="2"
                              :scale-min="0"
                              :scale-max="180"
                              :scale-vertical="true"
                              :scale-ranges="[{
                                      from: 0,
                                      to: 20,
                                      color: '#2798df'
                                  }, {
                                      from: 50,
                                      to: 80,
                                      color: '#ffc700'
                                  }, {
                                      from: 80,
                                      to: 180,
                                      color: '#c20000'
                                  }]">
                <kendo-lineargauge-pointer :value="bluePointer" :color="'blue'"></kendo-lineargauge-pointer>
                <kendo-lineargauge-pointer :value="redPointer" :color="'red'"></kendo-lineargauge-pointer>
            </kendo-lineargauge>
    </div>
    <div class="col-sm-12 col-md-5 example-col">
           <kendo-radialgauge :gauge-area-width="300"
                              :scale-minor-unit="5"
                              :scale-start-angle="-30"
                              :scale-end-angle="210"
                              :scale-max="180">
                <kendo-radialgauge-pointer :value="bluePointer" :color="'blue'"></kendo-radialgauge-pointer>
                <kendo-radialgauge-pointer :value="redPointer" :color="'red'"></kendo-radialgauge-pointer>
            </kendo-radialgauge>
    </div>
</div>
Vue.use(GaugesInstaller);

new Vue({
    el: '#vueapp',
    data () {
        return {
            bluePointer: 65,
            redPointer: 30
      }
    }
})

Initializing with Webpack

  1. Install Kendo UI and add a theme.

    npm install --save @progress/kendo-ui
    npm install --save @progress/kendo-theme-default
  2. Install the Kendo UI Gauges package fro Vue.

    npm install --save @progress/kendo-gauges-vue-wrapper

    The package also exports the following wrappers for individual components:

    • LinearGauge
    • RadialGauge
  3. Import the Kendo UI packages to the App component. If you use the Kendo UI components more than once in your application, add all Kendo UI-related files to the main.js file. If you use the Kendo UI components once in your application, add the Kendo UI-related files the component where they will be referred.

    import '@progress/kendo-ui'
    import '@progress/kendo-theme-default/dist/all.css'
    
    import { LinearGauge,
             LinearGaugePointer,
             RadialGauge,
             RadialGaugePointer,
             GaugesInstaller} from '@progress/kendo-gauges-vue-wrapper'
    
    Vue.use(GaugesInstaller)
    
    new Vue({
       el: '#app',
       components: {
             LinearGauge,
             LinearGaugePointer,
             RadialGauge,
             RadialGaugePointer,
       }
    })
In this article