File tree Expand file tree Collapse file tree 3 files changed +85
-0
lines changed
examples/radial-gauge-value Expand file tree Collapse file tree 3 files changed +85
-0
lines changed Original file line number Diff line number Diff line change 1+ import { createApp } from 'vue'
2+ import App from './main.vue'
3+
4+ createApp ( App ) . mount ( '#app' )
Original file line number Diff line number Diff line change 1+ <template >
2+ <div class =" gauge-container" >
3+ <div class =" gauge-wrapper" >
4+ <RadialGauge :pointer =" pointer" />
5+ </div >
6+ <div class =" gauge-value" >{{ value }}</div >
7+ </div >
8+ </template >
9+ <script >
10+ import { RadialGauge } from ' @progress/kendo-vue-gauges' ;
11+
12+ export default {
13+ components: {
14+ RadialGauge,
15+ },
16+ computed: {
17+ pointer () {
18+ return { value: this .value };
19+ },
20+ },
21+ mounted () {
22+ setInterval (() => {
23+ this .value = Math .ceil (Math .random () * 100 );
24+ }, 1000 );
25+ },
26+ data () {
27+ return {
28+ value: 30 ,
29+ };
30+ },
31+ };
32+ </script >
33+ <style scoped>
34+ .gauge-value {
35+ position : relative ;
36+ left : 0 ;
37+ right : 0 ;
38+ top : -40px ;
39+ text-align : center ;
40+ }
41+ </style >
42+
Original file line number Diff line number Diff line change 1+ ---
2+ title : Display Value for the RadialGauge
3+ description : An example of how to display the value in the Kendo UI for Vue Native RadialGauge.
4+ type : how-to
5+ page_title : Display Value for the RadialGauge - Kendo UI for Vue RadialGauge
6+ slug : radial-gauge-value
7+ tags : radialgauge, gauge, value
8+ res_type : kb
9+ category : knowledge-base
10+ ---
11+
12+
13+ ## Environment
14+
15+ <table >
16+ <tbody>
17+ <tr>
18+ <td>Product Version</td>
19+ <td>3.3.13</td>
20+ </tr>
21+ <tr>
22+ <td>Product</td>
23+ <td>Progress® Kendo UI for Vue Native</td>
24+ </tr>
25+ </tbody>
26+ </table >
27+
28+ ## Description
29+
30+ How can I show the value of the RadialGauge in the center?
31+
32+ ## Solution
33+
34+ This can be achieved by rendering a custom label element with the value inside that is relatively positioned:
35+
36+ {% meta id height:500 %}
37+ {% embed_file radial-gauge-value/main.vue preview %}
38+ {% embed_file radial-gauge-value/main.js %}
39+ {% endmeta %}
You can’t perform that action at this time.
0 commit comments