nelsonBlack / ngx-gantt

A modern and powerful gantt chart component for Angular

Home Page:http://gantt.ngnice.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ngx-gantt

CircleCI Coverage Status npm (scoped) npm npm bundle size (scoped) All Contributors

A modern and powerful gantt component for Angular

Installation

$ npm i @worktile/gantt html2canvas --save
# or
$ yarn add @worktile/gantt html2canvas

Demo

Try out our live demo

Usage

1. Import the NgxGanttModule to use into your app.module.ts

import { NgModule } from '@angular/core';
import { NgxGanttModule } from '@worktile/gantt';

@NgModule({
  ...
  imports: [ NgxGanttModule, ... ]
  ...
})
export class AppModule {

}

2. Import style file in angular.json or import style in your style.scss

{
  "styles": ["node_modules/@worktile/gantt/styles/index.scss"]
}
@use '@worktile/gantt/styles/index.scss';

3. Using component

component.html

<ngx-gantt #gantt [items]="items">
  <ngx-gantt-table>
    <ngx-gantt-column name="Title" width="300px">
      <ng-template #cell let-item="item"> {{ item.title }} </ng-template>
    </ngx-gantt-column>
  </ngx-gantt-table>
</ngx-gantt>

component.ts

@Component({
  selector: 'app-gantt-example',
  templateUrl: './gantt.component.html'
})
export class AppGanttExampleComponent {
  items: GanttItem[] = [
    { id: '000000', title: 'Task 0', start: 1627729997, end: 1628421197 },
    { id: '000001', title: 'Task 1', start: 1617361997, end: 1625483597 }
  ];

  constructor() {}
}

See Getting Started for more details.

Development

$ git clone git@github.com:worktile/ngx-gantt.git
$ cd ngx-gantt
$ npm ci
$ npm run start

Roadmap

  • virtual scrolling

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Walker

πŸ’¬ πŸ’» 🎨 πŸ“– πŸš‡ 🚧 πŸ“† πŸ‘€

zhangwen

πŸ’»

cmq

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

LICENSE

MIT License

About

A modern and powerful gantt chart component for Angular

http://gantt.ngnice.com

License:MIT License


Languages

Language:TypeScript 80.4%Language:HTML 7.3%Language:JavaScript 6.5%Language:SCSS 5.8%Language:Shell 0.0%Language:Dockerfile 0.0%