I am attempting to use the kendo-diagram control in a VueJS application. I have two data sources, one for the actual nodes/shapes, and one for the connections between the nodes.
The documentation is pretty sparse, and the sample that you provide only deals with a Hierarchical data source.
Based purely on a guess, I did the following:
<template>
<v-content>
<kendo-datasource
ref="nodes"
:data="dataSource">
</kendo-datasource>
<kendo-datasource
ref="connections"
:data="connectionsDataSource">
</kendo-datasource>
<kendo-diagram
:data-source-ref="'nodes'"
:connections-data-source-ref="'connections'">
</kendo-diagram>
</v-content>
</template>
<script>
import Vue from "vue";
import "@progress/kendo-ui";
import "@progress/kendo-theme-default/dist/all.css";
import {
DataSource,
DataSourceInstaller
} from "@progress/kendo-datasource-vue-wrapper";
import { Diagram, DiagramInstaller } from "@progress/kendo-diagram-vue-wrapper";
Vue.use(DataSourceInstaller);
Vue.use(DiagramInstaller);
export default {
data: function() {
return {
dataSource: [
{ id: "one", name: "One" },
{ id: "two", name: "Two" },
{ id: "five", name: "Five" }
],
connectionsDataSource: [
{ from: "one", to: "two", label: "plus one" },
{ from: "one", to: "five", label: "plus three" }
]
};
},
components: {
Diagram
}
};
</script>
I get the following error when running this page:
Error: Incorrect DataSource type. If a single dataSource instance is set to the diagram then it should be a HierarchicalDataSource. You should set only the options instead of an instance or a HierarchicalDataSource instance or supply connectionsDataSource as well.
What should I do in order to get both a data source, and connections data source bound to the diagram? Also, where can I find actual documentation for the VueJS implementation?
Thanks,
Stephan