| Name | Type | Default |
|
baseColor
# |
String
|
'#C2EEFF'
|
Sets or gets the default color used when the colorMode property is set to "autoColors".
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" :baseColor="'#C2EEAA'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
colorRanges
# |
Array | Object
|
[ { color: '#aa9988', min: 0, max: 10 }, { color: '#ccbbcc', min: 11, max: 50 }, { color: '#000', min: 50, max: 100 } ];
|
Sets or gets the color ranges used when the colorMode property is set to "rangeColors"
<template>
<JqxTreeMap
ref="myTreeMap"
:source="source"
:colorRange="50"
:colorRanges="colorRanges"
:colorMode="'rangeColors'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const colorRanges = ref([
{ color: '#52CBFF', min: 0, max: 85 },
{ color: '#52CBAA', min: 86, max: 105 }
]);
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
colorRange
# |
Number
|
100
|
Sets or gets the range in which the base colors can vary. The value is expected to be from 0 to 255.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="100" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
colorMode
# |
String
|
'parent'
|
Sets or gets the sectors rendering behavior.
- parent - a child sector inherits the color from its parent sector. Depending on the child value and the colorRange property the color varies.
- autoColors - automatic color generation based on the baseColor/colorRange and the value.
- rangeColors - the user can sets array of color ranges. Each color range has the properties min, max and color.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" :colorMode="'autoColors'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
displayMember
# |
String
|
""
|
Sets or gets the displayMember property. The displayMember determines the name of an object property to display. The name is contained in the collection specified by the source property and the name is stored in the label field of each sector. The property is taken into account when the jqxTreeMap's source property points to jqxDataAdapter instance.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" :displayMember="'label'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
height
# |
Number | String
|
600
|
Sets or gets the jqxTreeMap's height.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" :height="500" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
hoverEnabled
# |
Boolean
|
false
|
Sets or gets whether a sector will be outlined when the mouse cursor is over it.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" :hoverEnabled="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
Sets or gets the height of the parent sector's header.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" :headerHeight="30" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'East', value: null },
{ label: 'West', value: null },
{ label: 'USA', value: 104, parent: 'West' },
{ label: 'Republic of China', value: 88, parent: 'East' },
{ label: 'Great Britain', value: 65, parent: 'West' },
{ label: 'Russian Federation', value: 82, parent: 'East' }
]);
</script>
|
|
legendLabel
# |
String
|
"Legend"
|
Sets or gets the Legend's label.
<template>
<JqxTreeMap
ref="myTreeMap"
:source="source"
:colorRange="50"
:legendLabel="'Olympic medal count - London 2012'"
:colorMode="'autoColors'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
legendPosition
# |
Object
|
{ x: 0, y: -5 }
|
Sets or gets the Legend's position. The x determines the X offset of the Legend from the left side of the jqxTreeMap. The y determines the Y offset of the Legend from the bottom side of jqxTreeMap.
<template>
<JqxTreeMap
ref="myTreeMap"
:source="source"
:colorRange="50"
:legendPosition="{ x: 20, y: 0 }"
:colorMode="'autoColors'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
legendScaleCallback
# |
Function
|
null
|
Sets or gets a callback function which formats the values displayed in the jqxTreeMap's Legend.
<template>
<JqxTreeMap
ref="myTreeMap"
:source="source"
:colorRange="50"
:colorMode="'autoColors'"
:legendScaleCallback="legendScaleCallback"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
function legendScaleCallback(v) {
v = v.toFixed(1);
return v;
}
</script>
|
|
renderCallbacks
# |
Object
|
null
|
Sets or gets callback function(s) which enable you to customize the rendering of any sector in the jqxTreeMap. To define a callback function for all sectors, use the "*" : function(sectorHtmlElement, sectorData) syntax. To define a callback function for a specific element, use its label value instead of "*".
<template>
<JqxTreeMap
ref="myTreeMap"
:source="source"
:colorRange="50"
:renderCallbacks="renderCallbacks"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const renderCallbacks = ref({
'*': function (element, data) {
element.css({ color: '#ffffff' });
element.html(
'<span style="font-size: 11px;" class="jqx-treemap-label">' +
data.label +
', ' +
data.value +
'</span>'
);
return true;
}
});
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
selectionEnabled
# |
Boolean
|
true
|
Sets or gets whether a sector will be outlined when it is clicked..
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" :selectionEnabled="false" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
showLegend
# |
Boolean
|
true
|
Determines whether the jqxTreeMap's Legend is displayed. Legend is possible to be displayed when the colorMode property is set to "autoColors" or "rangeColors".
<template>
<JqxTreeMap
ref="myTreeMap"
:source="source"
:colorRange="50"
:showLegend="false"
:colorMode="'autoColors'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
source
# |
Object | Array
|
null
|
Specifies the jqxTreeMap's data source. Use this property to populate the jqxTreeMap.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" :theme="'material'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
valueMember
# |
String
|
""
|
Sets or gets the valueMember property. The valueMember determines the name of an object property to set as a value of the treemap sectors. The name is contained in the collection specified by the source property. The property is taken into account when the jqxTreeMap's source property points to jqxDataAdapter instance.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" :valueMember="'value'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
width
# |
Number | String
|
600
|
Sets or gets the jqxTreeMap's width.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" :width="500" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
</script>
|
|
|
|
bindingComplete
# |
Event
|
|
This event is triggered when the jqxTreeMap's source property is set to point to jqxDataAdapter instance and the jqxDataAdapter's binding is finished.
Code examples #
Bind to the bindingComplete event of jqxTreeMap.
<template>
<JqxTreeMap ref="myTreeMap" @bindingComplete="onBindingComplete($event)" :colorRange="50" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const myTreeMap = ref(null);
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
function onBindingComplete(event) {
alert('do something...');
}
onMounted(() => {
myTreeMap.value.source = source.value;
});
</script>
|
|
|
| Name | Arguments | Return Type |
|
destroy
# |
None
|
None
|
Destroy the jqxTreeMap widget. The destroy method removes the jqxTreeMap widget from the web page.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const myTreeMap = ref(null);
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
onMounted(() => {
myTreeMap.value.destroy();
});
</script>
|
|
render
# |
None
|
None
|
Renders the jqxTreeMap widget.
<template>
<JqxTreeMap ref="myTreeMap" :source="source" :colorRange="50" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTreeMap from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtreemap.vue';
const myTreeMap = ref(null);
const source = ref([
{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }
]);
onMounted(() => {
myTreeMap.value.render();
});
</script>
|