Coder Social home page Coder Social logo

ironpillar-sheng / x6 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from antvis/x6

0.0 0.0 0.0 298.04 MB

🚀 JavaScript diagramming library that uses SVG and HTML for rendering.

Home Page: https://x6.antv.vision

License: MIT License

JavaScript 0.69% TypeScript 92.05% Shell 0.31% Less 2.47% HTML 1.60% CSS 2.87%

x6's Introduction

X6

JavaScript diagramming library that uses SVG and HTML for rendering.

MIT License Language PRs Welcome website build coverage Language grade: JavaScript

NPM Package NPM Downloads NPM Dependencies Dependency Status devDependencies Status

Features

  • 🌱 easy-to-customize: based on well known SVG/HTML/CSS or React to custom nodes and edges
  • 🚀 out-of-the-box: built-in 10+ plugins, such as selection, dnd, redo/undo, snapline, minimap, etc.
  • 🧲 data-driven: base on MVC architecture, you can focus on data logic and business logic
  • 💯 highly-event-driven: you can react on any event that happens inside the graph

Installation

NPM/Yarn

# npm
$ npm install @antv/x6 --save

# yarn
$ yarn add @antv/x6

CDNs

For learning purposes, you can use the latest version with one of the CDN:

<script src="https://unpkg.com/@antv/x6/dist/x6.js"></script>

For production, we recommend linking to a specific version number to avoid unexpected breakage from newer versions:

<script src="https://unpkg.com/@antv/[email protected]/dist/x6.js"></script>

Usage

Step 1: specify a container the render the diagram.

<div id="container" style="width: 600px; height: 400px"></div>

Step 2: render nodes and edges.

import { Graph } from '@antv/x6'

// Create an instance of Graph.
const graph = new Graph({
  container: document.getElementById('container'),
  grid: true
})

// Render source node.
const source = graph.addNode({
  x: 300,
  y: 40,
  width: 80,
  height: 40,
  label: 'Hello',
})

// Render target node.
const target = graph.addNode({
  x: 420,
  y: 180,
  width: 80,
  height: 40,
  label: 'World',
})

// Render edge from source to target.
graph.addEdge({
  source,
  target,
})

HelloWorld

Documentation

App Demos Build with X6

Flowchart

A flowchart is a type of diagram that represents a workflow or process. A flowchart can also be defined as a diagrammatic representation of an algorithm, a step-by-step approach to solving a task.

draw

DAG

DAG is short for Directed Acyclic Graph, which is a directed graph with no directed cycles. It was originally a common data structure in the computer field. Due to the excellent characteristics brought by the unique topology structure, it is often used to deal with dynamic programming, searching for the shortest path in navigation, data compression and other algorithms.

dag

ERD

An entity relationship diagram (ERD) shows the relationships of entity sets stored in a database. An entity in this context is an object, a component of data. An entity set is a collection of similar entities. These entities can have attributes that define its properties. By defining the entities, their attributes, and showing the relationships between them, an ER diagram illustrates the logical structure of databases.

er

Experience Improvement Program Description

In order to serve the users better, X6 will send the URL and version information back to the AntV server:

https://kcart.alipay.com/web/bi.do

Except for URL and X6 version information, no other information will be collected. You can also turn it off with the following code:

import { Config } from '@antv/x6'

Config.track(false)

Communication

Welcome to join the X6 Communication Group (Scan the QR Code to Join us). We also welcome the github issues.

X6 图可视化交流群

Development

# install yarn and lerna
$ npm install yarn -g
$ npm install lerna -g

# install deps and build
$ yarn bootstrap

# run tests
$ yarn test

# build
$ yarn build

Contributing

Please let us know how can we help. Do check out issues for bug reports or suggestions first.

To become a contributor, please follow our contributing guide.

Contributors

Contributors

License

The scripts and documentation in this project are released under the MIT License.

x6's People

Contributors

bubkoo avatar semantic-release-bot avatar newbyvector avatar x6-bot[bot] avatar dependabot-preview[bot] avatar afc163 avatar zdc1111 avatar jtsang4 avatar imgbotapp avatar lyn-boyu avatar imgbot[bot] avatar chunwei avatar xrkffgg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.