Vue UI Components Documentation
The Vue BarGauge displays multiple values in a circular graph. This guide adds the Vue BarGauge (jqxBarGauge) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-scriptsjqwidgets-scripts/jqwidgets-vue3/vue_jqxbargauge.vue 
In a Vue 3 project (to start one, see Getting started with Vue), add the package:
npm install jqwidgets-scripts
import JqxBarGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbargauge.vue';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.tailwind-blue-dark.css';
With <script setup>, an imported component is ready to use in the template. jqx.base.css is required; the second file is a theme, selected with the theme attribute.
The Default Functionality demo as a Single-File Component:
<template>
<JqxBarGauge
:width="width"
:height="600"
:colorScheme="'scheme02'"
:max="150"
:values="values"
:tooltip="tooltip"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxBarGauge from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbargauge.vue';
const width = ref('90%');
const tooltip = ref({
visible: true,
formatFunction: (value) => {
let realVal = parseInt(value);
return 'Year: 2026<br/>Price Index:' + realVal;
}
});
const values = ref([102, 115, 130, 137]);
</script>
Options are attributes. Bind values from the script with :, for example :width="850".
Listen to an event with @ and its name. For example, valueChanged: Fires after the values are changed.
<script setup>
function onValueChanged(event) {
console.log(event.args);
}
</script>
<template>
<JqxBarGauge @valueChanged="onValueChanged" />
</template>
Call methods through a template ref. For example, val: Returns an array of the BarGauge values.
<script setup>
import { ref, onMounted } from 'vue';
const myBarGauge = ref(null);
onMounted(() => {
const value = myBarGauge.value.val([30, 80, 120]);
console.log(value);
});
</script>
<template>
<JqxBarGauge ref="myBarGauge" />
</template>
Every component also has setOptions({ … }) and getOptions('name').