d3-trace

0.0.3 • Public • Published

Welcome to d3-trace 👋

Version Documentation Maintenance License: ISC

用于描述请求调用关系的图

🏠 Homepage

Install

yarn add d3-trace

Usage

import Trace from 'd3-trace'
const instance = new Trace(document.body, {
  brushEnd () {},
  data: [{}, ...], // 空数组或空数据默认不会完成初始化操作,所以要确保该数组不能为空,以便完成图的初始化操作
})

// render
instance.render()

// destory
instance.destory()

// update
instance.setOptions(newData)

Default configuration

{
  graph: {
    axis: {
      offset: {
        top: 20,
        left: 0,
        right: 0,
        bottom: 0,
      },
      tickPadding: 3,
      tickCount: 4,
      tickSize: 5,
      pos: 'TOP',
    },
    bar: {
      offset: {
        top: 20,
        left: 0,
      },
      barHeight: 5,
      margin: 4,
    },
    brush: {
      offset: {
        top: 20,
        left: 0,
      },
    },
  },
  table: {
    rowHeight: 30,
    rectHeight: 12,
    paddingLeft: 2,
    tooltipTemplate (data) {}
    infoTemplate (data) {}
  }
}

Data structure

{
  "traceID": "",
  "spanID": "",
  "operationName": "",
  "startTime": 0,
  "duration": 6.626,
  "endTime": 6.626,
  "tags": [],
  "logs": [],
  "warnings": null,
  "process": {},
  "children": []
}

Jaeger

Jaeger UI

Author

👤 twinkle77

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2019 twinkle77.
This project is ISC licensed.


This README was generated with ❤️ by readme-md-generator

Readme

Keywords

Package Sidebar

Install

npm i d3-trace

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

1.16 MB

Total Files

36

Last publish

Collaborators

  • twinkle77