Hello.
How to add column programatically?
Version: Gantt Trial 4.0.8
Angular version: 9.1.9
Without wrapper.
I have following code:
const ganttInstance = new Gantt(<GanttConfig>{
columns: new ColumnStore(<ColumnStoreConfig> {
data: <Column[]> [
new Column(<ColumnConfig> {
field: 'name',
text: 'Task name'
})
]
}),
// ...
And I want to set task name in this column.
Errors after rendering page:
TypeError: Cannot read property 'on' of undefined
at _0x5eabe5._0x3e1d5f (gantt.umd.js:10)
at new _0x2f8ef5 (gantt.umd.js:10)
at _0x5eabe5._0x5a9a13 (gantt.umd.js:10)
at new _0x293c51 (gantt.umd.js:10)
at _0x5eabe5._0x31b921 (gantt.umd.js:10)
at new _0x1bf659 (gantt.umd.js:10)
at _0x5eabe5._0x550fac (gantt.umd.js:10)
at new _0x2b166c (gantt.umd.js:10)
at _0x5eabe5._0x1ad991 (gantt.umd.js:10)
at new _0x3e8c0b (gantt.umd.js:10)
&
Error: Uncaught (in promise): TypeError: Cannot read property 'count' of undefined
TypeError: Cannot read property 'count' of undefined
at _0x191dd3._0x249e4d (gantt.umd.js:10)
at _0x191dd3._0x29c849 (gantt.umd.js:10)
at _0x3435d8._0x1426cf (gantt.umd.js:10)
at _0x3435d8._0x5bfd3c (gantt.umd.js:10)
at _0x87e2ec._0x3391a0 (gantt.umd.js:10)
at _0x53135b._0x2f497c (gantt.umd.js:10)
at _0x109abb (gantt.umd.js:10)
at Generator._0x5a0990 [as _invoke] (gantt.umd.js:10)
at Generator.next (gantt.umd.js:10)
at _0x81339a (gantt.umd.js:10)
at resolvePromise (zone-evergreen.js:798)
at zone-evergreen.js:705
at zone-evergreen.js:721
at ZoneDelegate.invoke (zone-evergreen.js:364)
at Object.onInvoke (core.js:41654)
at ZoneDelegate.invoke (zone-evergreen.js:363)
at Zone.run (zone-evergreen.js:123)
at zone-evergreen.js:857
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Object.onInvokeTask (core.js:41632)