Open cppypl opened 5 months ago
@gearcoded
@cppypl,
It is a bug in Gantt that it constantly repaints itself. The bug occurs with the specific page/frame sizes when the container's width
or height
is set to a percent value. If the container has the fixed sizes like 800px
, the bug is not reproduced.
The bug will be fixed in the next update, but I cannot give you any ETA.
If you have the license, you can submit a support request to the email specified in the letter with the license and include the link to this issue. Then we'll share a build with the fix.
Also, you have an obsolete scale configuration, so it will not work as expected in some cases.
You need to include all the scales inside the gantt.config.scales
parameter:
// remove this
gantt.config.scale_unit = 'day'
gantt.config.step = 1
gantt.config.date_scale = '周' + '%D'
// use "scales"
gantt.config.scales = [
// {unit:"day", step:1, date:"星期"+"%D" },
// { unit: 'year', step: 1, format: '%Y' },
{ unit: 'month', step: 1, format: '%Y' + '年' + '%M' },
{ unit: 'day', step: 1, date: '%M' + '%d' + '日' },
{ unit: 'day', step: 1, date: '周%D' }
]
gantt.config.autosize = true
When aotosize is set to true, the page will render the dom infinitely repeatedly, resulting in a CPU full load.Here is my initialization code: ` init(ganttData) { let that = this // 甘特图的数据 let task = {} task.data = ganttData
Has anyone encountered this problem?