Skip to content

๐Ÿ— Data-driven directed acyclic graph (DAG) builder for Vue.js

License

Notifications You must be signed in to change notification settings

claudinoac/vue-dag-next

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ—Vue DAG Buildr (VueJS 3+)

Data-driven directed acyclic graph (DAG) visual builder for Vue.js

GitHub Actions Netlify Status npm npm vue3 GitHub

Examples

vue-dag-example.netlify.app

Screenshot

eddy-analytics.org

Screenshot Eddy

Installation

npm install --save vue-dag-next

or

yarn add vue-dag-next

Import and register the component

import VueDag from 'vue-dag-next';
components: {
    VueDag
}

Define the graph data

data() {
    return {
        graphData: {
            config: {
                scale: 1,
                width: '100%',
                height: '100vh',
                readonly: false,
            },
            nodes: [
                {
                    id: 0,
                    x: 500 * Math.random(),
                    y: 500 * Math.random(),
                    component: <<custom component>>,
                    props: { exampleProp: 'โœจ' },
                },
                {
                    id: 1,
                    x: 500 * Math.random(),
                    y: 500 * Math.random(),
                    content: 'Example content',
                },
                { id: 2, x: 500 * Math.random(), y: 500 * Math.random() },
            ],
            edges: [
                {
                    id: 0, from: 0, to: 1, edgeColor: 'red', arrowColor: 'red',
                },
                { id: 1, from: 1, to: 2 },
            ],
        },
    }
}

Use it in templates

<vue-dag v-model="graphData"></vue-dag>

The component does not include any CSS. You'll need to import it separately:

import 'vue-dag-next/dist/vue-dag-next.css';

Alternatively, you can import the SCSS version and overrite variables and styles

@import 'vue-dag-next/src/scss/vue-dag.scss';

Full documentation: https://vue-dag-next.netlify.com/

Project development setup

Installs dependencies

yarn install

Compiles and hot-reloads for development

yarn run serve

Lints and fixes files

yarn run lint

Runs unit tests

yarn run test:unit

Builds as library

yarn run build:library

About

๐Ÿ— Data-driven directed acyclic graph (DAG) builder for Vue.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vue 82.4%
  • SCSS 7.0%
  • JavaScript 5.0%
  • HTML 3.1%
  • TypeScript 2.5%