| Name | Type | Default |
|
animationDuration
# |
Number
|
1000
|
Sets or gets jqxLinearGauge's animation duration [ms].
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:animationDuration="3000"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const myLinearGauge = ref(null);
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
onMounted(() => {
myLinearGauge.value.val(50);
});
</script>
|
|
background
# |
Object
|
{ borderRadius: 15, style: { stroke: '#cccccc', fill: 'default-gradient'}, visible: true, backgroundType: 'roundedRectangle', showGradient: true }
|
Sets or gets the gauge's properties for it's background.
Possible Values:
'borderType' - specifies the border type. Possible values are 'rectangle' and 'roundedRectangle'
'borderRadius' - sets the border radius
'visible' - indicates if the border will be visible
'style' - sets border style (color and thickness
'showGradient' - whether a gradient background will be used
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:background="background"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const background = ref({ style: { stroke: '#ffaaaa', fill: '#ffaaaa' } });
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
colorScheme
# |
String
|
'scheme01'
|
Sets the gauge's color palette. jqxLinearGauge supports 11 color schemes from 'scheme01' to 'scheme11'.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:colorScheme="'scheme06'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
disabled
# |
Boolean
|
false
|
Sets or gets whether the jqxLinearGauge is disabled.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:disabled="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
easing
# |
String
|
'linear'
|
Sets or gets jqxLinearGauge's animation easing.
Possible Values:
'linear'
'easeOutBack'
'easeInQuad'
'easeInOutCirc'
'easeInOutSine'
'easeOutCubic'
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:easing="'easeInQuad'"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const myLinearGauge = ref(null);
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
onMounted(() => {
myLinearGauge.value.val(50);
});
</script>
|
|
height
# |
Number | String
|
300
|
Sets or gets the gauge's height. This property accepts size in pixels and percentage.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:height="300"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
int64
# |
Boolean
|
false
|
Enables the jqxLinearGauge 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>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:int64="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
labels
# |
Object
|
{ position: 'both', interval: 20, offset: 0, visible: true, formatValue: function (value, position) { return value; }}
|
Sets or gets the gauge's properties for it's labels.
Possible Values:
position - specifies the gauge's labels position. Possible values for this property are 'far', 'near' and 'both'. If 'near' is used labels will be visible only in the left hand side of the ticks. If the 'far' value is set ticks will be visible only in the right hand side of the ticks. Otherwise, if the 'both' value is used the labels will be shown in both sides of the ticks
style - specifies the gauge's pointer style. Here you can set it's fill or stroke color
interval - specifies labels's frequency
offset - specifies labels's offset from the ticks
formatValue - callback used for formatting the label. This function accepts two parameters. The first one is the label's value and the second one is the label's position
visible - indicates whether the labels will be visible
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:labels="labels"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const labels = ref({ position: 'far', interval: 20, offset: 3, visible: true });
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
min
# |
Number
|
-60
|
Sets or gets gauge's minimum value.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:min="0"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
max
# |
Number
|
40
|
Sets or gets jqxLinearGauge's max value.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:max="70"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
orientation
# |
String
|
'vertical'
|
Sets or gets jqxLineaerGauge's orientation.
Possible Values:
'vertical'
'horizontal'
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:width="300"
:height="100"
:orientation="'horizontal'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
pointer
# |
Object
|
{ pointerType: 'default', style: { fill: 'theme-specific-color', stroke: 'theme-specific-color' }, size: '7%', visible: true, offset: 0 }
|
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 column otherwise it'll be an arrow
'style' - specifies the gauge's pointer style. Here you can set it's fill or stroke color
'size' - specifies pointer's size. This property can be set in percents ('0%' - '100%') or in pixels
'visible' - indicates whether the pointer will be visible
'offset' - indicates the left offset of the pointer
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:pointer="pointer"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const pointer = ref({ pointerType: 'arrow', size: '10%', visible: true, offset: 10 });
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
rangesOffset
# |
Number
|
0
|
Sets or gets ranges offset from the ticks.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:rangesOffset="rangesOffset"
:ranges="ranges"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const rangesOffset = ref(10);
const ranges = ref([
{ startValue: 0, endValue: 20, style: { fill: '#FFA200', stroke: '#FFA200' } },
{ startValue: 20, endValue: 45, style: { fill: '#FF4800', stroke: '#FF4800' } }
]);
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
rangeSize
# |
String
|
'5%'
|
Sets or gets the size of the ranges. This property can be set in percentage or in pixels.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:rangeSize="rangeSize"
:ranges="ranges"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const rangeSize = ref('7%');
const ranges = ref([
{ startValue: 0, endValue: 20, style: { fill: '#FFA200', stroke: '#FFA200' } },
{ startValue: 20, endValue: 45, style: { fill: '#FF4800', stroke: '#FF4800' } }
]);
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
ranges
# |
Array
|
[]
|
This property is array from 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
'style' - this property is object containing style information for the range. It accepts properties like 'fill', 'stroke', etc (typical for SVG/VML)
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:ranges="ranges"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ranges = ref([
{ startValue: 0, endValue: 10, style: { fill: '#FFA200', stroke: '#FFA200' } },
{ startValue: 10, endValue: 40, style: { fill: '#FF4800', stroke: '#FF4800' } }
]);
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
showRanges
# |
Boolean
|
true
|
This property indicates whether the gauge's ranges will be visible.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:showRanges="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
scaleStyle
# |
Object
|
{ stroke: '#A1A1A1', 'stroke-width': 1 }
|
Sets or gets the style of the line connecting all the ticks.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:scaleStyle="scaleStyle"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const scaleStyle = ref({ stroke: '#000000', 'stroke-width': 3 });
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
scaleLength
# |
String | Number
|
'90%'
|
Sets or gets the length of the scale. This property could be set in percentage or in pixels.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:scaleLength="'80%'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
<template>
<JqxLinearGauge ref="myLinearGauge"
:ticksMinor="ticksMinor" :ticksMajor="ticksMajor" :value="0" :theme="'material'"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({
size: '10%',
interval: 10
});
const ticksMinor = ref({
size: '5%',
interval: 2.5
});
</script>
|
|
ticksOffset
# |
Array
|
['36%', '5%']
|
Sets or gets the offset of the ticks. The first element of the array is the left offset and the second one is the top offset. This property can be set in pixels or percentage.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:ticksOffset="[50, 10]"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
ticksPosition
# |
String
|
'both'
|
Sets or gets jqxLineaerGauge's ticks position.
Possible Values:
'near'-ticks will be visible only in the left side of the scale
'far'-ticks will be visible only in the right side of the scale
'both'-ticks will be visible in both sides
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:ticksPosition="'far'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
ticksMinor
# |
Object
|
{ size: '10%', interval: 5, style: { stroke: '#A1A1A1', 'stroke-width': 1 }, 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 percentage
'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>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
ticksMajor
# |
Object
|
{ size: '10%', interval: 5, style: { stroke: '#A1A1A1', 'stroke-width': 1 }, 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>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
value
# |
Number
|
-50
|
Sets or gets gauge's value.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
width
# |
Number | String
|
100
|
Sets or gets the gauge's width. This property accepts size in pixels and percentage.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
:width="100"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
</script>
|
|
|
|
valueChanging
# |
Event
|
|
The event is raised when the gauge's value is changing.
Code examples #
Bind to the valueChanging event of jqxLinearGauge.
<template>
<div>
<JqxLinearGauge
ref="myLinearGauge"
@valueChanging="onValueChanging($event)"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
/>
<JqxButton style="margin-top: 20px" :width="80" @click="changeValue()"
>Change value</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myLinearGauge = ref(null);
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
function changeValue() {
myLinearGauge.value.val(5);
}
function onValueChanging(event) {
alert('do something...');
}
</script>
|
|
valueChanged
# |
Event
|
|
The event is raised when the gauge's value is changed.
Code examples #
Bind to the valueChanged event of jqxLinearGauge.
<template>
<div>
<JqxLinearGauge
ref="myLinearGauge"
@valueChanged="onValueChanged($event)"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
/>
<JqxButton style="margin-top: 20px" :width="80" @click="changeValue()"
>Change value</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myLinearGauge = ref(null);
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
function changeValue() {
myLinearGauge.value.val(30);
}
function onValueChanged(event) {
alert('do something...');
}
</script>
|
|
|
| Name | Arguments | Return Type |
|
disable
# |
None
|
None
|
This method disables the gauge.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const myLinearGauge = ref(null);
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
onMounted(() => {
myLinearGauge.value.disable();
});
</script>
|
|
enable
# |
None
|
None
|
This method enables the gauge.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const myLinearGauge = ref(null);
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
onMounted(() => {
myLinearGauge.value.enable();
});
</script>
|
|
val
# |
value
|
Number
|
Sets or gets the value.
<template>
<JqxLinearGauge
ref="myLinearGauge"
:ticksMinor="ticksMinor"
:ticksMajor="ticksMajor"
:value="0"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxLinearGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlineargauge.vue';
const myLinearGauge = ref(null);
const ticksMajor = ref({ size: '10%', interval: 10 });
const ticksMinor = ref({ size: '5%', interval: 2.5 });
onMounted(() => {
const value = myLinearGauge.value.val();
});
</script>
|