Skip to content

Column names automatically change on re-initialization of Gantt chart #23

@hamadhassan3

Description

@hamadhassan3

I am integrating the export server in my application and there is a problem in the internal configuration of the Gantt chart. Since there is no direct method for exporting without the showExportDialog option (at least not mentioned in the documentation), I had to do some digging into the source code and used the MultiPageVerticalExporter class directly using the following configuration for export:

const config = {
exporterConfig: {
type: "multipagevertical",
},
client: this.$options.GANTT_INSTANCE,
paperFormat: 'A4',
rangeStart: this.$options.GANTT_INSTANCE.startDate,
rangeEnd: this.$options.GANTT_INSTANCE.endDate,

// This is the part where I have the issue. I found these names for the columns by printing the chart config at runtime.
columns: ['name1', 'col1'],
rowsRange: 'all',
scheduleRange: 'completeview',

fileFormat: payload.fileFormat,
orientation: payload.orientation,

}

Whenever I reinitialize the Gantt instance, the column names are updated so my configuration no longer remains valid and the chart is not displayed correctly in the exported PDF file. To fix this in my code, I had to dynamically fetch the names at runtime. I believe the initialization of the Gantt chart should not be stateful as it is misleading and is resulting in these issues. Please advise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions