1.3.2 • Published 6 years ago

at-chart v1.3.2

Weekly downloads
45
License
MIT
Repository
github
Last release
6 years ago

chart

d3 force layout for learning

NPM version node version npm download npm GitHub license

  • Vue
  • d3.js
  • web worker

Client Render Static Force Layout

nodesd3d3 && web workerEcharts Force
1000msms> d3 && web worker
500020s5s> d3 && web worker
1000040s10s> d3 && web worker

Install

yarn add at-chart

Usage

import at-chart from 'at-chart'
import 'at-chart/dist/css/AtChart.min.css'
Vue.use(at-chart)
<template>
  <div>
    <p>{{process}}</p>
    <at-chart :nodes="nodes" :edges="edges" @renderProcess="setProcess"/>
  </div>
</template>
<script>
const num = 1000
const nodes = d3.range(num).map(function (i) {
  return {
    index: i,
    name: '10.255.81.47'
  }
})
const edges = d3.range(nodes.length - 1).map(function (i) {
  return {
    source: Math.floor(Math.sqrt(i)),
    target: i + 1
  }
})
export default {
  name: 'app',
  data() {
    return {
      process: '',
      nodes = nodes
      edges = edges
    }
  },
  methods: {
    setProcess(process) {
      this.process = process
    }
  }
}
</script>

Example

d3-chart Demo

nodemon server.js

Attributes

AttributeDescriptionTypeAccepted ValuesDefault
nodesNodesArray——————
edgesEdgesArray——————

Events

Event NameDescriptionParameters
renderProcessRender Processprocess

Methods

MethodDescriptionParameters

Update

yarn upgrade at-chart

Build Setup npm or yarn

# install dependencies
yarn install

# serve with hot reload at localhost:xxx
yarn run dev

# build for production with minification
yarn run package

# build for production and view the bundle analyzer report
npm run package --report
1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.29

6 years ago

1.0.28

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago