| Name | Type | Default |
|
animationDuration
# |
Number
|
400
|
Sets or gets jqxGauge's animation duration [ms].
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the animationDuration property. let animationDuration = myGauge.value.animationDuration;
|
|
border
# |
Object
|
{ size: '10%', style: { stroke: '#cccccc'}, visible: true, showGradient: true }
|
Sets or gets the gauge's properties for it's border.
Possible Values:
'size'-specifies the size of the border. Border's size can be set in percentage or in pixels
'visible'-indicates if the border will be visible
'style'-sets border style (color and thickness)
'showGradient' - whether a gradient background will be used
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:border="border"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const border = ref({ size: '11%', style: { stroke: '#898989' }, visible: true });
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the border property. let border = myGauge.value.border;
|
|
caption
# |
Object
|
{ value: '', position: 'bottom', offset: [0, 0], visible: true }
|
Sets or gets the gauge's properties for it's caption.
Possible Values:
'value' - specifies the text
'position' - specifies the caption position. There four different positions - top, bottom, left and right. You can customize the position using the offset property described bellow
'offset' - array with two number elements. The first one indicates the left offset and the second one the top offset
'visible' - indicates whether the caption will be visible
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:caption="caption"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const caption = ref({ value: 'jQWidgets', position: 'bottom', offset: [0, 10], visible: true });
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the caption property. let caption = myGauge.value.caption;
|
|
cap
# |
String | Object
|
{ size: '4%', style: { fill: 'theme-specific-color', stroke: 'theme-specific-color' } , visible: true }
|
Sets or gets the gauge's properties for it's cap.
Possible Values:
'size' - specifies the gauge's size. This property can be set as percentage or in pixels
'visible' - indicates whether the cap will be visible
'style' - specifies the gauge's cap styles. Here you can set it's fill or stroke colors
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:cap="cap"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const cap = ref({ size: '5%', style: { fill: '#ff0000', stroke: '#00ff00' }, visible: true });
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the cap property. let cap = myGauge.value.cap;
|
|
colorScheme
# |
String
|
'scheme01'
|
Sets the gauge's color palette. jqxGauge supports 11 color schemes from 'scheme01' to 'scheme11'.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:colorScheme="'scheme01'"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the colorScheme property. let colorScheme = myGauge.value.colorScheme;
|
|
disabled
# |
Boolean
|
false
|
Sets or gets whether the jqxGauge is disabled.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:disabled="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the disabled property. let disabled = myGauge.value.disabled;
|
|
easing
# |
String
|
linear
|
Sets or gets jqxGauge's animation easing.
Possible Values:
'linear'
'easeOutBack'
'easeInQuad'
'easeInOutCirc'
'easeInOutSine'
'easeOutCubic'
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:easing="'linear'"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the easing property. let easing = myGauge.value.easing;
|
|
endAngle
# |
Number
|
270
|
Sets or gets gauge's endAngle. This property specifies the end of the gauge's scale and is measured in degrees.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:endAngle="250"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the endAngle property. let endAngle = myGauge.value.endAngle;
|
|
height
# |
Number | String
|
350
|
Sets or gets the gauge's height. This property accepts size in pixels and percentage.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:height="400"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the height property. let height = myGauge.value.height;
|
|
int64
# |
Boolean
|
false
|
Enables the jqxGauge 64-bit number support.
Note: If this property is set to true, the properties value, min, max, ranges.startValue, ranges.endValue, ticksMinor.interval, ticksMajor.interval and labels.interval should be set to string values.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:int64="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the int64 property. let int64 = myGauge.value.int64;
|
|
labels
# |
Object
|
{ distance: '38%', position: 'none', interval: 20, offset: [0, -10], visible: true, formatValue: function (value) { return value; }}
|
Sets or gets the gauge's properties for it's labels.
Possible Values:
'distance' - specifies the labels distance from the gauge's center. This value could be set in percents ('0%' - '100%') or using pixels. This property is with lower priority than the position property
'position' - specifies the gauge's labels position. Possible values for this property are 'inside', 'outside' and 'none' (if you want to use the distance property). If it's value is inside the labels are going to be shown inside the scale otherwise they will be shown outside. This property is with higher priority than the distance property
'interval' - specifies labels's frequency
'offset' - specifies labels's offset. This property is array with two elements. The first one is the left offset and the second one is the top offset
'style' - specifies the gauge's pointer style. Here you can set it's fill or stroke color
'formatValue' - callback used for formatting the label. This function accepts a single parameter which the user can format and return to the labels renderer
'visible' - indicates whether the labels will be visible
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:labels="labels"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const labels = ref({
distance: '50px',
position: 'inside',
interval: 20,
offset: [0, -10],
visible: true,
formatValue: function (value) {
return value;
}
});
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the labels property. let labels = myGauge.value.labels;
|
|
min
# |
Number
|
0
|
Sets or gets gauge's minimum value.
<template>
<JqxGauge ref="myGauge" :min="10" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the min property. let min = myGauge.value.min;
|
|
max
# |
Number
|
220
|
Sets or gets jqxGauge's max value.
<template>
<JqxGauge ref="myGauge" :max="140" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the max property. let max = myGauge.value.max;
|
|
pointer
# |
Object
|
{ pointerType: 'default', style: { fill: 'theme-specific-color', stroke: 'theme-specific-color' }, length: '70%', width: '2%', visible: true }
|
Sets or gets the gauge's properties for it's pointer.
Possible Values:
'pointerType' - specifies the pointer type. Possible values for this property are - 'default' and 'rectangle'. If it's value is 'default' the pointer will be arrow otherwise it'll be rectangle
'style' - specifies the gauge's pointer style. Here you can set it's fill or stroke color
'width' - specifies pointer's width. This property can be set in percents ('0%' - '100%') or in pixels
'length' - specifies pointer's length. This property can be set in percents ('0%' - '100%') or in pixels
'visible' - indicates whether the pointer will be visible
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:pointer="pointer"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const pointer = ref({
pointerType: 'rectangle',
style: { fill: '#ff0000', stroke: '#ff0000' },
length: '80%',
width: '3%',
visible: true
});
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the pointer property. let pointer = myGauge.value.pointer;
|
|
radius
# |
Number
|
'50%'
|
Sets or gets gauge's radius. This property accepts size in pixels and percentage.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:radius="150"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the radius property. let radius = myGauge.value.radius;
|
|
ranges
# |
Array
|
[]
|
This property is array of objects. Each object is different range. The range is colored area with specified size.
Possible Values:
'startValue'-the value from which the range will start
'endValue'-the value where the current range will end
'startWidth'-the width of the range in it's start
'endWidth'-the end width of the range
'startDistance [optional]'-this property is measured in pixels or percentage. It indicates the distance from the gauge's outer boundary to the start of the range
'endDistance [optional]'-this property is measured in pixels or percentage. It indicates the distance from the gauge's outer boundary to the end of the range
'style'-this property is object containing style information for the range. It accepts properties like 'fill', 'stroke', etc.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the ranges property. let ranges = myGauge.value.ranges;
|
|
startAngle
# |
Number
|
30
|
Sets or gets gauge's startAngle. This property specifies the beginning of the gauge's scale and is measured in degrees.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:startAngle="40"
:endAngle="200"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the startAngle property. let startAngle = myGauge.value.startAngle;
|
|
showRanges
# |
Boolean
|
true
|
This property indicates whether the gauge's ranges will be visible.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:showRanges="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the showRanges property. let showRanges = myGauge.value.showRanges;
|
|
styles
# |
Object
|
{ fill: '#ffffff', stroke: '#ffffff' }
|
Sets or gets the gauge's style.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:styles="styles"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const styles = ref({ fill: '#cccccc', stroke: '#cccccc' });
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the styles property. let styles = myGauge.value.styles;
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
<template>
<JqxGauge ref="myGauge"
:ranges="ranges" :ticksMinor="ticksMinor" :ticksMajor="ticksMajor" :animationDuration="1200"
:theme="'material'"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({
interval: 5,
size: '5%'
});
const ticksMajor = ref({
interval: 10,
size: '9%'
});
const ranges = ref([{
startValue: 0,
endValue: 55,
style: {
fill: '#4bb648',
stroke: '#4bb648'
},
endWidth: 5,
startWidth: 1
}, {
startValue: 55,
endValue: 110,
style: {
fill: '#fbd109',
stroke: '#fbd109'
},
endWidth: 10,
startWidth: 5
}, {
startValue: 110,
endValue: 165,
style: {
fill: '#ff8000',
stroke: '#ff8000'
},
endWidth: 13,
startWidth: 10
}, {
startValue: 165,
endValue: 220,
style: {
fill: '#e02629',
stroke: '#e02629'
},
endWidth: 16,
startWidth: 13
}]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
|
|
ticksMajor
# |
Object
|
{ size: '10%', interval: 5, style: { stroke: '#898989'}, visible: true }
|
Sets or gets the gauge's properties for it's major ticks.
Possible Values:
'size'-specifies the length of the tick. This property is measured in pixels or percentage
'interval'-specifies the ticks frequency. With interval equals to 5 each fifth value of the gauge will have a major tick
'visible'-indicates if the major ticks will be visible
'style'-sets ticks style (color and thickness)
<template>
<JqxGauge ref="myGauge" :ticksMajor="ticksMajor" :value="100" />
</template>
<script setup>
import { ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const ticksMajor = ref({ interval: 60, size: '15%' });
</script>
Get the ticksMajor property. let ticksMajor = myGauge.value.ticksMajor;
|
|
ticksMinor
# |
Object
|
{ size: '10%', interval: 5, style: { stroke: '#898989'}, visible: true }
|
Sets or gets the gauge's properties for it's minor ticks.
Possible Values:
'size'-specifies the length of the tick. This property can be set in pixels or in percentag
'interval'-specifies the ticks frequency. With interval equals to 5 each fifth value of the gauge will have a minor tick
'visible'-indicates if the minor ticks will be visible
'style'-sets ticks style (color and thickness)
<template>
<JqxGauge ref="myGauge" :ticksMinor="ticksMinor" :value="100" />
</template>
<script setup>
import { ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const ticksMinor = ref({ interval: 1, size: '5%' });
</script>
Get the ticksMinor property. let ticksMinor = myGauge.value.ticksMinor;
|
|
ticksDistance
# |
String
|
'20%"
|
Sets and gets the ticks position. This property can be specified using percents (between '0%' and '100%') or using pixels. If the ticksRadius is '0%' this will position the ticks in the outer border of the gauge and if it's '100%' ticks will be positioned near the center.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:ticksDistance="'50%'"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the ticksDistance property. let ticksDistance = myGauge.value.ticksDistance;
|
|
value
# |
Number
|
0
|
Sets or gets gauge's value.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:value="100"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the value property. let value = myGauge.value.value;
|
|
width
# |
Number | String
|
350
|
Sets or gets the gauge's width. This property accepts size in pixels and percentage.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
:width="300"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
});
</script>
Get the width property. let width = myGauge.value.width;
|
|
|
|
valueChanging
# |
Event
|
|
The event is is triggered when the gauge's value is changing.
Code examples #
Bind to the valueChanging event of jqxGauge.
<template>
<JqxGauge
ref="myGauge"
@valueChanging="onValueChanging($event)"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
function onValueChanging(event) {
alert('do something...');
}
onMounted(() => {
myGauge.value.value = 140;
});
</script>
|
|
valueChanged
# |
Event
|
|
The event is is triggered when the gauge's value is changed.
Code examples #
Bind to the valueChanged event of jqxGauge.
<template>
<JqxGauge
ref="myGauge"
@valueChanged="onValueChanged($event)"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
function onValueChanged(event) {
alert('do something...');
}
onMounted(() => {
myGauge.value.value = 140;
});
</script>
|
|
|
| Name | Arguments | Return Type |
|
disable
# |
None
|
None
|
This method disables the gauge.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.value = 140;
myGauge.value.disable();
});
</script>
|
|
enable
# |
None
|
None
|
This method enables the gauge.
<template>
<JqxGauge
ref="myGauge"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
myGauge.value.disable();
setTimeout((_) => {
myGauge.value.enable();
myGauge.value.value = 140;
}, 1000);
});
</script>
|
|
val
# |
value
|
Number
|
Sets or gets the value.
<template>
<JqxGauge
ref="myGauge"
:value="140"
:ranges="ranges"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:animationDuration="1200"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgauge.vue';
const myGauge = ref(null);
const ticksMinor = ref({ interval: 5, size: '5%' });
const ticksMajor = ref({ interval: 10, size: '9%' });
const ranges = ref([
{
startValue: 0,
endValue: 55,
style: { fill: '#4bb648', stroke: '#4bb648' },
endWidth: 5,
startWidth: 1
},
{
startValue: 55,
endValue: 110,
style: { fill: '#fbd109', stroke: '#fbd109' },
endWidth: 10,
startWidth: 5
},
{
startValue: 110,
endValue: 165,
style: { fill: '#ff8000', stroke: '#ff8000' },
endWidth: 13,
startWidth: 10
},
{
startValue: 165,
endValue: 220,
style: { fill: '#e02629', stroke: '#e02629' },
endWidth: 16,
startWidth: 13
}
]);
onMounted(() => {
const value = myGauge.value.val();
});
</script>
|