An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
import '../_shared/shared.js'; // not required, our example styling etc.
import Gantt from '../../lib/Gantt/view/Gantt.js';
import TaskStore from '../../lib/Gantt/data/TaskStore.js';
import ProjectModel from '../../lib/Gantt/model/ProjectModel.js';
import ResourceAssignmentColumn from '../../lib/Gantt/column/ResourceAssignmentColumn.js';
import '../../lib/Gantt/column/AllColumns.js';
import ColumnStore from '../../lib/Grid/data/ColumnStore.js';
import StringHelper from '../../lib/Core/helper/StringHelper.js';
const resources = [
{
id : 1,
name : 'Celia',
city : 'Barcelona',
calendar : null,
image : 'celia.jpg'
}
];
const taskData = [
{
id : 1000,
name : 'Launch SaaS Product',
percentDone : 34,
startDate : '2019-01-14',
endDate : '2019-03-20',
duration : 47,
expanded : false,
complexity : 3,
children : []
}
];
Forum post
Steps to reproduce:
Gantt/examples/basic/app.js
with:const resources = [ { id : 1, name : 'Celia', city : 'Barcelona', calendar : null, image : 'celia.jpg' } ]; const taskData = [ { id : 1000, name : 'Launch SaaS Product', percentDone : 34, startDate : '2019-01-14', endDate : '2019-03-20', duration : 47, expanded : false, complexity : 3, children : [] } ];
const assignmentData = [ { id : 1, event : 11, resource : 1 } ];
class GNT_TaskStore extends TaskStore { static get type() { return 'gnt_taskstore'; }
}
GNT_TaskStore.initClass();
class GNT_ResourceAssignmentColumn extends ResourceAssignmentColumn { static get $name() { return 'GNT_ResourceAssignmentColumn'; }
}
ColumnStore.registerColumnType(GNT_ResourceAssignmentColumn);
const project = new ProjectModel({ taskStoreClass : GNT_TaskStore });
const gantt = new Gantt({ appendTo : 'container', dependencyIdField : 'sequenceNumber', rowHeight : 45, tickSize : 45, barMargin : 8, project,
});