I've HighchartsVue in my project and i want to use TreeMap.
In application.js following configuration are:
import HighchartsVue from 'highcharts-vue';
setup({ el, App, props, plugin }) {
createApp({ render: () => h(App, props) })
.use(HighchartsVue)
.use(FloatingVue)
.mount(el);
}
I'm able to use Bar, Line, Colume charts etc. But now i want to configure TreeMap chart and getting this error:
Error: Highcharts error #13: www.highcharts.com/errors/13/
at Object.<anonymous> (chunk-63ZCELNG.js?v=4197c962:74:21)
at E (chunk-63ZCELNG.js?v=4197c962:223:42)
at f2 (chunk-63ZCELNG.js?v=4197c962:72:11)
at a2.getContainer (chunk-63ZCELNG.js?v=4197c962:5808:19)
at a2.firstRender (chunk-63ZCELNG.js?v=4197c962:6084:18)
at a2.<anonymous> (chunk-63ZCELNG.js?v=4197c962:5596:20)
at E (chunk-63ZCELNG.js?v=4197c962:223:42)
at a2.init (chunk-63ZCELNG.js?v=4197c962:5559:13)
at a2.getArgs (chunk-63ZCELNG.js?v=4197c962:5555:62)
at new a2 (chunk-63ZCELNG.js?v=4197c962:5545:18)
I have use this option but still not working,
<template>
<div>
<Highcharts :options="chartOptions" />
</div>
</template>
<script setup>
import { ref } from 'vue';
import HighchartsVue from 'highcharts-vue';
import Highcharts from 'highcharts';
import treemap from 'highcharts/modules/treemap';
treemap(Highcharts);
const chartOptions = ref({
chart: {
type: 'treemap'
},
series: [{
data: [{
name: 'A',
value: 10
}, {
name: 'B',
value: 7
}]
}]
});
</script>
You're getting Highcharts error #13 which means that the rendering div was not found. Make sure that you're rendering chart to the right div element.
About importing treemap module, here's example code:
Here are the docs: https://github.com/highcharts/highcharts-vue#importing-highcharts-modules