Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hamadhassan3 opened this issue Jun 13, 2024 · 0 comments

Comments

@hamadhassan3
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant