I was trying to create a TimeLine using Vis.js, using the Vuejs 2 adapter for Visjs, ( link ) and the following error:
It should be some import error. If someone can help, follow the code:
import vue2vis from 'vue2vis';
import Vue from 'vue'
Vue.component('timeline', vue2vis.Timeline);
const ItemComponent = Vue.extend({
template: '<p>{{item.content}}</p>',
props: ['item'],
});
export default {
data(){
return {
groups: [{
id: 0,
content: 'Group 1'
}],
items: [{
id: 0,
group: 0,
start: new Date(),
content: 'Item 1'
}],
options: {
editable: true,
template: (item) => {
return new ItemComponent({
store: this.$store,
parent: this,
propsData: {
item,
},
}).$mount().$el;
}
}
}
},
}
<div id="visualization" ref="myDiv">
<timeline ref="timeline" :items="items" :groups="groups" :options="options">
</div>
</div>
Thanks in advance for your help!