Hi @jinhua,
You can take a look at this snippet.
Ignore the rest, but you can click on the toggle button. The corresponding code to show or hide is through gantt.config.show_chart api - doc.
toggle
gantt.config.show_chart
I solved this problem ,thank you !