From e2a9185dac3db30c388fdce274620bcf2358f93a Mon Sep 17 00:00:00 2001 From: Kostas Minaidis Date: Tue, 29 May 2018 20:20:18 +0300 Subject: [PATCH] Adding CSS file and options example --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bfe53e6..50ca4b5 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,10 @@ npm install frappe-gantt ``` ### Usage -Include it in your html: +Include it in your HTML: ``` + ``` And start hacking: @@ -43,6 +44,23 @@ var tasks = [ var gantt = new Gantt("#gantt", tasks); ``` +You can also pass various options to the Gantt constructor: +```js +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', + custom_popup_html: null +}); +``` + If you want to contribute: 1. Clone this repo.