A simple flowchart component made with Vue. Requires a graph-like data structure as an input and renders it as a flowchart.
npm install --save vue-flowter
Import in your component (and the CSS as well):
import 'vue-flowter/flowter.css'
import Flowter from 'vue-flowter'
Vue.component('Flowter', Flowter)
<template>
<flowter :nodes="nodes" :edges="edges">
</template>
<script>
export default {
data () {
return {
nodes: {
a: { text: 'Node A' },
b: { text: 'Node B' },
c: { text: 'Node C' }
},
edges: [
{ from: 'a', to: 'b', text: 'To B' },
{ from: 'a', to: 'c', text: 'To C' }
]
}
}
}
</script>
It would render something like this:
All of the nodes and edges are being positioned and shaped by default, although you can customize it if you want to (but not now, see TODO). The goal is to make creating flowcharts as simple as possible.
If you need more visual customizations, of course you can add your own styling with CSS.
Please see the docs for more details on the props.
npm run install && npm run serve
This will serve the component along with the example of the flowchart data.
npm run test
This will run all the tests using Jest.
This component is not complete. Several things before the first major release:
MIT
Generated using TypeDoc