Vue UI Components Documentation
The Vue HeatMap shows a matrix of values as coloured cells, on a gradient or a fixed colour scale, with a legend and tooltips. This guide adds the Vue HeatMap (jqxHeatMap) to an app, then shows how to set its options and call its methods.
jqwidgets-scriptsjqwidgets-scripts/jqwidgets-vue3/vue_jqxheatmap.vue 
In a Vue 3 project (to start one, see Getting started with Vue), add the package:
npm install jqwidgets-scripts
import JqxHeatMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxheatmap.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>
<JqxHeatMap :source="source" :xAxis="xAxis" :yAxis="yAxis" :title="title"></JqxHeatMap>
</template>
<script setup>
import { ref } from 'vue';
import JqxHeatMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxheatmap.vue';
const source = ref([
[89, 39, 94, 55, 3],
[53, 38, 26, 68, 33],
[22, 0, 66, 90, 78],
[97, 68, 68, 3, 99],
[47, 47, 88, 6, 1],
[73, 23, 3, 79, 100],
[21, 86, 13, 33, 0],
[53, 81, 95, 79, 66],
[74, 68, 88, 51, 43],
[10, 12, 78, 14, 21],
[55, 58, 12, 82, 99],
[88, 23, 86, 59, 53]
]);
const xAxis = ref({
labels: [
'John',
'Marry',
'Alba',
'Steven',
'Josh',
'Alica',
'Robert',
'Kim',
'Ann',
'Paul',
'Regina',
'Dorothy'
]
});
const yAxis = ref({ labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'] });
const title = ref('Car sales revenue per employee(in 1000 €)');
</script>
<style>
#app {
width: 100%;
max-width: 1000px;
margin: 0 auto;
}
</style>
Options are attributes. Bind values from the script with :, for example :width="850".
Call methods through a template ref. For example, setLegendPosition: Sets legend's position.
<script setup>
import { ref, onMounted } from 'vue';
const myHeatMap = ref(null);
onMounted(() => {
myHeatMap.value.setLegendPosition('Bottom');
});
</script>
<template>
<JqxHeatMap ref="myHeatMap" />
</template>
Every component also has setOptions({ … }) and getOptions('name').