Мне нужно создать страницу .vue с картой Highcharts, я хотел бы вставить итальянскую карту в следующем примере:
https://jsfiddle.net/gh/get/library/pure/highslide-software/highcharts.com/tree/master/samples/mapdata/countries/it/it-all
Я до сих пор не понимаю, как импортировать этот скрипт и поэтому ссылка на итальянскую карту:
вот код о том, что я пытаюсь:
<template>
<div id="Cdl">
<div class="main-wrapper">
<Highmaps :options="options" />
</div>
</div>
</template>
<script>
import HighCharts from 'vue-highcharts';
import loadMap from 'highcharts/modules/map.js';
import { genComponent } from 'vue-highcharts';
export default {
components: {
Highmaps: genComponent('Highmaps', HighCharts),
},
data() {
return {
options:{
chart: {
map: 'countries/it/it-all'
},
title: {
text: 'Highmaps basic demo'
},
subtitle: {
text: 'Italy'
},
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'bottom'
}
},
colorAxis: {
min: 0
},
series: [{
data: [
['it-na', 0],
['it-tp', 1],
['it-pa', 2],
['it-me', 3],
['it-ag', 4],
['it-nu', 5],
['it-og', 6],
['it-ms', 7],
['it-mt', 8],
['it-bn', 9],
['it-cl', 10],
['it-an', 11],
['it-pg', 12],
['it-ci', 13],
['it-ss', 14],
['it-ot', 15],
['it-gr', 16],
['it-li', 17],
['it-ar', 18],
],
name: 'Random data',
states: {
hover: {
color: '#BADA55'
}
},
dataLabels: {
enabled: true,
format: '{point.name}'
}
}]
},
}
},
created() {
loadMap(HighCharts)
},
};
</script>