Merge pull request #302 from DennisAnim/dennisGantt-Repo

chore: `index.html`
This commit is contained in:
Sagar Sharma 2023-01-04 10:34:40 +05:30 committed by GitHub
commit 33cb61533e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,13 +16,16 @@
.gantt .bar-milestone .bar { .gantt .bar-milestone .bar {
fill: tomato; fill: tomato;
} }
.heading {
text-align: center;
}
</style> </style>
<link rel="stylesheet" href="dist/frappe-gantt.css" /> <link rel="stylesheet" href="dist/frappe-gantt.css" />
<script src="dist/frappe-gantt.js"></script> <script src="dist/frappe-gantt.js"></script>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<h2>Interactive Gantt Chart entirely made in SVG!</h2> <h2 class="heading">Interactive Gantt Chart entirely made in SVG!</h2>
<div class="gantt-target"></div> <div class="gantt-target"></div>
</div> </div>
<script> <script>
@ -84,16 +87,16 @@
} }
] ]
var gantt_chart = new Gantt(".gantt-target", tasks, { var gantt_chart = new Gantt(".gantt-target", tasks, {
on_click: function (task) { on_click: task => {
console.log(task); console.log(task);
}, },
on_date_change: function(task, start, end) { on_date_change: (task, start, end) => {
console.log(task, start, end); console.log(task, start, end);
}, },
on_progress_change: function(task, progress) { on_progress_change: (task, progress) => {
console.log(task, progress); console.log(task, progress);
}, },
on_view_change: function(mode) { on_view_change: (mode) => {
console.log(mode); console.log(mode);
}, },
view_mode: 'Month', view_mode: 'Month',