Code Monkey home page Code Monkey logo

gantt's Introduction

Frappe Gantt

A simple, interactive, modern gantt chart library for the web

View the demo »

Install

npm install frappe-gantt

Usage

Include it in your HTML:

<script src="frappe-gantt.min.js"></script>
<link rel="stylesheet" href="frappe-gantt.css">

And start hacking:

var tasks = [
  {
    id: 'Task 1',
    name: 'Redesign website',
    start: '2016-12-28',
    end: '2016-12-31',
    progress: 20,
    dependencies: 'Task 2, Task 3',
    custom_class: 'bar-milestone' // optional
  },
  ...
]
var gantt = new Gantt("#gantt", tasks);

You can also pass various options to the Gantt constructor:

var gantt = new Gantt("#gantt", tasks, {
    header_height: 50,
    column_width: 30,
    step: 24,
    view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
    bar_height: 20,
    bar_corner_radius: 3,
    arrow_curve: 5,
    padding: 18,
    view_mode: 'Day',
    date_format: 'YYYY-MM-DD',
    language: 'en', // or 'es', 'it', 'ru', 'ptBr', 'fr', 'tr', 'zh', 'de', 'hu'
    custom_popup_html: null
});

Contributing

If you want to contribute enhancements or fixes:

  1. Clone this repo.
  2. cd into project directory
  3. yarn
  4. yarn run dev
  5. Open index.html in your browser, make your code changes and test them.

Publishing

If you have publishing rights (Frappe Team), follow these steps to publish a new version.

Assuming the last commit (or a couple of commits) were enhancements or fixes,

  1. Run yarn build

    This will generate files in the dist/ folder. These files need to be committed.

  2. Run yarn publish

  3. Type the new version at the prompt

    Depending on the type of change, you can either bump the patch version or the minor version. For e.g.,

    0.5.0 -> 0.6.0 (minor version bump)
    0.5.0 -> 0.5.1 (patch version bump)
    
  4. Now, there will be a commit named after the version you just entered. Include the generated files in dist/ folder as part of this commit by running the command:

    git add dist
    git commit --amend
    git push origin master
    

License: MIT


Project maintained by frappe

gantt's People

Contributors

netchampfaris avatar s-aga-r avatar dependabot[bot] avatar anurag810 avatar diegodurrod avatar gavindsouza avatar hiawui avatar anto-christo avatar huchim avatar davidalves1 avatar dalwadani avatar jeroenrinzema avatar kostasx avatar mhunesi avatar raghu-kamath avatar rmehta avatar shariquerik avatar st7s avatar stephanvierkant avatar steve-kasica avatar takanashiasuka avatar kannkyo avatar dbtek 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.