I cloned a sample of React Gantt from react-gantt-demo [github] and made some adjust to toggle the show_chart.
I default the config of show_chart to be true, and upon first toggle, it is able to close the chart. But upon clicking again, it does not open up the chart as well.
The left side bar also look weird after the chart is closed, the + does not get pushed to the most right.
Hello Joseph,
Looks like, it was a bug in the 4.2 version.
I downloaded your sample from GitHub and reproduced the issue. But then I installed 6.0.5 version and it works correctly.
To install the newer version, you can specify it in the package.json file:
Or if you have the Pro/Trial version, you can use the following command:
npm install 'path to gantt folder with package.json file'
I was also wondering that in this snippet, whenever, the chart is toggled to hide. The left grid will be expanded to full width. Is it possible to hide the chart, and leaving the left grid width intact?
Kind of like the left grid will stay as it is, and the chart on the right will be hidden.
Hello Joseph,
Yes, it is possible to do that by modifying the styles: http://snippet.dhtmlx.com/ed4c9d203
The display property will really hide the chart, but if you decrease the size of the grid, you won’t be able to resize it back. The visibility only hides the chart, so you can freely resize the chart.
There is any easier way to achieve no border like my snippet.
Any way to remove the border like I did, but not the one between the left grid and the timeline (chart). So there should still a border line (solid) between them. Because if I do gantt_layout_cell_border_right to none, then it will be gone together with the one on the most right.
Like to clarify how did the .custom_css got applied into the chart? I don’t see any place that you specify .custom_css. When and how did it got applied into the css?