Represents Vuejs HeatMap Component
<ejs-heatmap></ejs-heatmap>
boolean
Enable or disable the selection of multiple cells in heatmap
<template>
<div id="app">
<ejs-heatmap id="heatmap" :titleSettings='titleSettings' :xAxis='xAxis' :yAxis='yAxis' :dataSource='dataSource' :allowSelection='allowSelection'></ejs-heatmap>
</div>
</template>
<script>
import Vue from 'vue';
import { HeatMapPlugin, Tooltip, Legend } from '@syncfusion/ej2-vue-heatmap';
Vue.use(HeatMapPlugin);
export default {
data: function() {
return {
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
],
titleSettings: {
text: 'Sales Revenue per Employee (in 1000 US$)',
textStyle: {
size: '15px',
fontWeight: '500',
fontStyle: 'Normal',
fontFamily: 'Segoe UI'
}
},
xAxis: {
labels: ['Nancy', 'Andrew', 'Janet', 'Margaret', 'Steven',
'Michael', 'Robert', 'Laura', 'Anne', 'Paul', 'Karin', 'Mario']
},
yAxis: {
labels: ['Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat']
},
allowSelection: true
}
},
provide:{
heatmap:[Tooltip, Legend]
},
}
</script>
Defaults to false
string
Specifies the background color of the entire heatmap.
Defaults to null
Options to customize the heat map cell
<template>
<div class="control_wrapper">
<ejs-heatmap id="heatmap" :dataSource='dataSource' :xAxis='xAxis' :yAxis='yAxis' :titleSettings='titleSettings' :legendSettings='legendSettings' :cellSettings='cellSettings'>
</ejs-heatmap>
</div>
</template>
<script>
import Vue from 'vue';
import { HeatMapPlugin, Tooltip, Legend } from '@syncfusion/ej2-vue-heatmap';
Vue.use(HeatMapPlugin);
export default {
data: function() {
return {
cellSettings: {
showLabel: false,
},
titleSettings: {
text: 'Sales Revenue per Employee (in 1000 US$)',
textStyle: {
size: '15px',
fontWeight: '500',
fontStyle: 'Normal',
fontFamily: 'Segoe UI'
}
},
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
],
legendSettings: {
visible:true,
position: 'Right',
showLabel: true,
height: "150"
}
}
},
provide:{
heatmap:[Tooltip, Legend]
},
}
</script>
Object
Specifies the datasource for the heat map.
Defaults to null
Specifies the datasource settings for heat map.
<template>
<div id="app">
<ejs-heatmap id="heatmap" :titleSettings='titleSettings' :xAxis='xAxis' :yAxis='yAxis' :paletteSettings='paletteSettings' :dataSource='dataSource' :dataSourceSettings='dataSourceSettings' :cellSettings='cellSettings'></ejs-heatmap>
</div>
</template>
<script>
import Vue from 'vue';
import { HeatMapPlugin, Tooltip, Legend, Adaptor } from '@syncfusion/ej2-vue-heatmap';
Vue.use(HeatMapPlugin);
export default {
data: function() {
return {
dataSource: [
{ 'Region': 'USA', '2000': 93, '2004': 101, '2008': 112, '2012': 103, '2016': 121 },
{ 'Region': 'GBR', '2000': 28, '2004': 30, '2008': 49, '2012': 65, '2016': 67 },
{ 'Region': 'China', '2000': 58, '2004': 63, '2008': 100, '2012': 91, '2016': 70 },
{ 'Region': 'Russia', '2000': 89, '2004': 90, '2008': 60, '2012': 69, '2016': 55 },
{ 'Region': 'Germany', '2000': 56, '2004': 49, '2008': 41, '2012': 44, '2016': 42 },
{ 'Region': 'Japan', '2000': 18, '2004': 37, '2008': 25, '2012': 38, '2016': 41 },
{ 'Region': 'France', '2000': 38, '2004': 33, '2008': 43, '2012': 35, '2016': 42 },
{ 'Region': 'KOR', '2000': 28, '2004': 30, '2008': 32, '2012': 30, '2016': 21 },
{ 'Region': 'Italy', '2000': 34, '2004': 32, '2008': 27, '2012': 28, '2016': 28 }
],
dataSourceSettings: {
isJsonData: true,
adaptorType: 'Table',
xDataMapping: 'Region'
},
titleSettings: {
text: 'Olympic Medal Achievements of most Successful Countries',
textStyle: {
size: '15px',
fontWeight: '500',
fontStyle: 'Normal',
fontFamily: 'Segoe UI'
}
},
xAxis: {
labels: ['China', 'France', 'GBR', 'Germany', 'Italy', 'Japan', 'KOR', 'Russia', 'USA'],
labelRotation: 45,
labelIntersectAction: 'None'
},
yAxis: {
title : {text: 'Olympic Year'},
labels: ['2000', '2004', '2008', '2012', '2016'],
},
}
},
provide:{
heatmap:[Tooltip, Legend, Adaptor]
}
}
</script>
boolean
Enable or disable the multiple selection of cells in heatmap.
Defaults to true
boolean
Enable or disable persisting component’s state between page reloads.
Defaults to false
boolean
Enable or disable rendering component in right to left direction.
Defaults to false
string
The height of the heatmap accepts pixel values given in string format.
Defaults to null
Options for customizing the legend of the heat map
<template>
<div class="control_wrapper">
<ejs-heatmap id="heatmap" :dataSource='dataSource' :xAxis='xAxis' :yAxis='yAxis' :titleSettings='titleSettings' :legendSettings='legendSettings'></ejs-heatmap>
</div>
</template>
<script>
import Vue from 'vue';
import { HeatMapPlugin, Tooltip, Legend } from '@syncfusion/ej2-vue-heatmap';
Vue.use(HeatMapPlugin);
export default {
data: function() {
return {
xAxis: {
labels: ['Nancy', 'Andrew','Janet', 'Margaret', 'Steven',
'Michael', 'Robert', 'Laura', 'Anne', 'Paul', 'Karin', 'Mario'],
},
yAxis:{
labels: ['Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat'],
},
titleSettings: {
text: 'Sales Revenue per Employee (in 1000 US$)',
textStyle: {
size: '15px',
fontWeight: '500',
fontStyle: 'Normal',
fontFamily: 'Segoe UI'
}
},
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
],
legendSettings: {
visible:true,
position: 'Right',
showLabel: true,
height: "150"
}
}
},
provide:{
heatmap:[Tooltip, Legend]
},
}
</script>
Defaults to ”
string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
Defaults to ”
Options to customize left, right, top and bottom margins of the heat map.
Options for customizing the cell color of the heat map
string
Specifies the rendering mode of heat map.
Defaults to SVG
boolean
Enable or disable the tool tip for heatmap
Defaults to true
string
Specifies the theme for heatmap.
Defaults to ‘Material’
Title of heat map
<template>
<div class="control_wrapper">
<ejs-heatmap id="heatmap" :dataSource='dataSource' :xAxis='xAxis' :yAxis='yAxis' :titleSettings='titleSettings'></ejs-heatmap>
</div>
</template>
<script>
import Vue from 'vue';
import { HeatMapPlugin, Tooltip, Legend } from '@syncfusion/ej2-vue-heatmap';
Vue.use(HeatMapPlugin);
export default {
data: function() {
return {
xAxis: {
labels: ['Nancy', 'Andrew','Janet', 'Margaret', 'Steven', 'Michael', 'Robert', 'Laura', 'Anne', 'Paul', 'Karin', 'Mario'],
},
yAxis:{
labels: ['Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat'],
},
titleSettings: {
text: 'Sales Revenue per Employee (in 1000 US$)',
textStyle: {
size: '15px',
fontWeight: '500',
fontStyle: 'Normal',
fontFamily: 'Segoe UI'
}
},
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
]
}
},
provide:{
heatmap:[Tooltip, Legend]
},
}
</script>
Defaults to ”
Options for customizing the ToolTipSettings property of the heat map
<template>
<div id="app">
<ejs-heatmap id="heatmap" :titleSettings='titleSettings' :xAxis='xAxis' :yAxis='yAxis' :dataSource='dataSource' :cellSettings='cellSettings' :showTooltip='showTooltip' :paletteSettings='paletteSettings' :tooltipSettings='tooltipSettings' :tooltipRender='tooltipRender'></ejs-heatmap>
</div>
</template>
<script>
import Vue from 'vue';
import { HeatMapPlugin, Tooltip, Legend } from '@syncfusion/ej2-vue-heatmap';
Vue.use(HeatMapPlugin);
export default {
data: function() {
return {
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
],
titleSettings: {
text: 'Crude Oil Production of Non-OPEC Countries (in Million barrels per day)',
textStyle: {
size: '15px',
fontWeight: '500',
fontStyle: 'Normal',
fontFamily: 'Segoe UI'
}
},
cellSettings: {
showLabel: true,
},
tooltipSettings: {
fill: '#696295',
textStyle: {
color: '#FFFFFF',
size: '12px'
},
border: {
width: 2,
color: '#F0C27B'
}
},
showTooltip: true
}
},
provide:{
heatmap:[Tooltip, Legend]
},
}
</script>
string
The width of the heatmap as a string accepts input as both like ‘100px’ or ‘100%‘. If specified as ‘100%, heatmap renders to the full width of its parent element.
Defaults to null
Options to configure the horizontal axis.
Options to configure the vertical axis.
To clear the multi cell selection
<template>
<div id="app">
<ejs-heatmap id="heatmap" ref="heatmap" :titleSettings="titleSettings" :allowSelection='allowSelection' :xAxis="xAxis" :yAxis="yAxis" :dataSource="dataSource"
></ejs-heatmap>
<div>
<ejs-button v-on:click.native="BtnClick">Clear Selection</ejs-button>
</div>
</div>
</template>
<script>
import Vue from "vue";
import { HeatMapPlugin, Tooltip, Legend } from "@syncfusion/ej2-vue-heatmap";
import { ButtonPlugin } from "@syncfusion/ej2-vue-buttons";
Vue.use(HeatMapPlugin);
Vue.use(ButtonPlugin);
export default {
data: function() {
return {
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
],
titleSettings: {
text: "Sales Revenue per Employee (in 1000 US$)",
textStyle: {
size: "15px",
fontWeight: "500",
fontStyle: "Normal",
fontFamily: "Segoe UI"
}
},
allowSelection: true
};
},
provide: {
heatmap: [Tooltip, Legend]
},
methods: {
BtnClick: function () {
this.$refs.heatmap.clearSelection();
}
}
};
</script>
Returns void
To destroy the widget
<template>
<div id="app">
<ejs-heatmap id="heatmap" ref="heatmap" :titleSettings="titleSettings" :xAxis="xAxis" :yAxis="yAxis" :dataSource="dataSource"
></ejs-heatmap>
<div>
<ejs-button v-on:click.native="BtnClick">Destroy</ejs-button>
</div>
</div>
</template>
<script>
import Vue from "vue";
import { HeatMapPlugin, Tooltip, Legend } from "@syncfusion/ej2-vue-heatmap";
import { ButtonPlugin } from "@syncfusion/ej2-vue-buttons";
Vue.use(HeatMapPlugin);
Vue.use(ButtonPlugin);
export default {
data: function() {
return {
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
],
titleSettings: {
text: "Sales Revenue per Employee (in 1000 US$)",
textStyle: {
size: "15px",
fontWeight: "500",
fontStyle: "Normal",
fontFamily: "Segoe UI"
}
},
};
},
provide: {
heatmap: [Tooltip, Legend]
},
methods: {
BtnClick: function () {
this.$refs.heatmap.$destroy();
}
}
};
</script>
Returns void
Handles the export method for heatmap control.
Returns void
Get component name
Returns string
Method to print the heatmap.
Returns void
Applies all the pending property changes and render the component again.
Returns void
Triggers when click the heat map cell.
Triggers before each heatmap cell renders.
<template>
<div id="app">
<ejs-heatmap id="heatmap" :titleSettings="titleSettings" :xAxis="xAxis" :yAxis="yAxis" :dataSource="dataSource" :cellRender="cellRender"
></ejs-heatmap>
</div>
</template>
<script>
import Vue from "vue";
import { HeatMapPlugin, Tooltip, Legend } from "@syncfusion/ej2-vue-heatmap";
Vue.use(HeatMapPlugin);
export default {
data: function() {
return {
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
],
titleSettings: {
text: "Sales Revenue per Employee (in 1000 US$)",
textStyle: {
size: "15px",
fontWeight: "500",
fontStyle: "Normal",
fontFamily: "Segoe UI"
}
},
};
},
provide: {
heatmap: [Tooltip, Legend]
},
methods: {
cellRender: function(args) {
args.displayText = args.value + "$";
}
}
};
</script>
Triggers when multiple cells gets selected.
EmitType<Object>
Triggers after heat map rendered.
EmitType<ILegendRenderEventArgs>
Triggers before the legend is rendered.
<template>
<div id="app">
<ejs-heatmap id="heatmap" :titleSettings="titleSettings" :xAxis="xAxis" :yAxis="yAxis" :dataSource="dataSource" :legendRender="legendRender"
></ejs-heatmap>
</div>
</template>
<script>
import Vue from "vue";
import { HeatMapPlugin, Tooltip, Legend } from "@syncfusion/ej2-vue-heatmap";
Vue.use(HeatMapPlugin);
export default {
data: function() {
return {
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
],
titleSettings: {
text: "Sales Revenue per Employee (in 1000 US$)",
textStyle: {
size: "15px",
fontWeight: "500",
fontStyle: "Normal",
fontFamily: "Segoe UI"
}
},
};
},
provide: {
heatmap: [Tooltip, Legend]
},
methods: {
legendRender: function(args) {
args.text = args.text +'k';
}
}
};
</script>
Triggers before heat map load.
<template>
<div id="app">
<ejs-heatmap id="heatmap" :titleSettings="titleSettings" :xAxis="xAxis" :yAxis="yAxis" :load='load' :dataSource="dataSource"
></ejs-heatmap>
</div>
</template>
<script>
import Vue from "vue";
import { HeatMapPlugin, Tooltip, Legend } from "@syncfusion/ej2-vue-heatmap";
import { ButtonPlugin } from "@syncfusion/ej2-vue-buttons";
Vue.use(HeatMapPlugin);
Vue.use(ButtonPlugin);
export default {
data: function() {
return {
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
],
titleSettings: {
text: "Sales Revenue per Employee (in 1000 US$)",
textStyle: {
size: "15px",
fontWeight: "500",
fontStyle: "Normal",
fontFamily: "Segoe UI"
}
},
allowSelection: true
};
},
provide: {
heatmap: [Tooltip, Legend]
},
methods: {
load: function(args) {
alert('Heatmap loaded successfully');
let selectedTheme = location.hash.split("/")[1];
selectedTheme = selectedTheme ? selectedTheme : "Material";
args.heatmap.theme =selectedTheme.charAt(0).toUpperCase() + selectedTheme.slice(1);
}
}
};
</script>
Triggers after heatmap is loaded.
Triggers after resizing of Heatmap.
Triggers when click the heat map cell.
<template>
<div id="app">
<ejs-heatmap id="heatmap" :titleSettings='titleSettings' :xAxis='xAxis' :yAxis='yAxis' :dataSource='dataSource' :cellSettings='cellSettings' :showTooltip='showTooltip' :paletteSettings='paletteSettings' :tooltipSettings='tooltipSettings' :tooltipRender='tooltipRender'></ejs-heatmap>
</div>
</template>
<script>
import Vue from 'vue';
import { HeatMapPlugin, Tooltip, Legend } from '@syncfusion/ej2-vue-heatmap';
Vue.use(HeatMapPlugin);
export default {
data: function() {
return {
dataSource: [
[73, 39, 26, 39, 94, 0],
[93, 58, 53, 38, 26, 68],
[99, 28, 22, 4, 66, 90],
[14, 26, 97, 69, 69, 3],
[7, 46, 47, 47, 88, 6],
[41, 55, 73, 23, 3, 79],
[56, 69, 21, 86, 3, 33],
[45, 7, 53, 81, 95, 79],
[60, 77, 74, 68, 88, 51],
[25, 25, 10, 12, 78, 14],
[25, 56, 55, 58, 12, 82],
[74, 33, 88, 23, 86, 59]
],
titleSettings: {
text: 'Crude Oil Production of Non-OPEC Countries (in Million barrels per day)',
textStyle: {
size: '15px',
fontWeight: '500',
fontStyle: 'Normal',
fontFamily: 'Segoe UI'
}
},
cellSettings: {
showLabel: true,
},
tooltipSettings: {
fill: '#696295',
textStyle: {
color: '#FFFFFF',
size: '12px'
},
border: {
width: 2,
color: '#F0C27B'
}
},
showTooltip: true
}
},
provide:{
heatmap:[Tooltip, Legend]
},
methods: {
tooltipRender: function(args){
args.content = ['In ' + args.yLabel + ', the ' + args.xLabel + ' produced ' + args.value + ' million barrels per day'];
}
}
}
</script>