Hi,
We want to add a user column and are following below example adding a separate file and then importing it in the gantt.config file. However there is an exception "Error: Column type 'priority' not registered" in gantt.module.js.
I would guess that for angular you add a column in he same way as extending taskModelClass. But we fail to find both something to put into the ganttConfig as well as the html gantt widget (data_inline example)
https://bryntum.com/products/gantt/docs/api/Gantt/column/AddNewColumn
//dedicated Column.js file
import ColumnStore from 'gantt-distr/lib/Grid/data/ColumnStore.js';
import Column from 'gantt-distr/lib/Grid/column/Column.js';
// New column class to display task priority
export default class TaskPriorityColumn extends Column {
// unique alias of the column
static get type() {
return 'priority';
}
// indicates that the column should be present in "Add New..." column
static get isGanttColumn() {
return true;
}
static get defaults() {
return {
// the column is mapped to "priority" field of the Task model
field : 'priority',
// the column title
text : 'priority'
};
}
}
// register new column
ColumnStore.registerColumnType(TaskPriorityColumn);
//adding the column to the config
const ganttConfig = {
project: {
},
infiniteScroll : true,
columns: [
{ type: 'wbs' },
{ type: 'name' },
{ type: 'priority' },
...
],
/Johan