GithubHelp home page GithubHelp logo

yilianyoumen8714 / time-gantt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prototeam/time-gantt

0.0 0.0 0.0 241 KB

一个react类甘特图图表,功能是时间基线上的任务耗时管理,并且能够与过往耗时进行对比

JavaScript 95.57% CSS 4.43%

time-gantt's Introduction

time-gantt

一个react类甘特图图表,功能是时间基线上的任务耗时管理,并且能够与过往耗时进行对比。

运行效果

image 可以直接去demo文件夹运行。进入deo文件夹。

    npm install
    npm start

使用

    npm i time-gantt --save

调用

    import Gantt from 'time-gantt';
    <Gantt data={data}></Gantt>

接口

data的数据结构:

const data = {
  title: "业务甘特图", // 图表名
  showPercent: 0.1, // 显示百分比
  showStartPercent: 0.2, // 起始位置百分比
  showDate: '2018-04-01 00:00', // 展示的日期
  nodes: [
    {
      id: '1',
      name: '小鹿1', // 任务名
      yAxis: '任务1', // Y 轴
      value: {   // 运行时间
        startTime: '2018-03-31 23:30',
        endTime: '2018-04-01 02:25',
      },
      averageValue: 3600000,  // 历史运行时间 // 毫秒
      highlightPoints: [{ // 错误点
        time: '2018-04-01 02:10',
      }],
    },
}
欢迎提PR

time-gantt's People

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.