Gantt chart library for react: passing necessary options object to react wrapper #847
-
We would like to use a Gantt chart for our drop-plants app project to allow users to indicate to allow users to define periods of relevant tasks for specific crops (eg seed period). There are several libraries available, but from what I have seen so far, none works out of the box for our specific purpose. One requirement for our app is that the visible time period is exactly one calendar year (Jan-Dec) and no scrolling to previous or later time points extending beyond this calendar year is possible. Within this year, users should be able to define a time period. Our favorite library for the implementation of this feature is frappe gantt: https://frappe.io/gantt (github: https://github.com/frappe/gantt/blob/master/README.md). This library allows to set the 'padding' to the left and right of the time period in view (see frappe/gantt#387, frappe/gantt#330, frappe/gantt#169). I am not sure this will completely handle our case, since the chart may still be scrollable though. The padding can be set via 'view_mode_padding' in an options object passed. There is a react wrapper for the JS library on github: https://github.com/Soremwar/react-frappe-gantt. As far as I can see, the component extending the Gantt class is defined here: https://github.com/Soremwar/react-frappe-gantt/blob/master/src/components/FrappeGantt.jsx. However, here I can't see how the options object required to customize (among other things) the padding can be passed, since the options object (third argument) seems to only take a subset of prespecified options:
Using the react-frappe-gantt wrapper works for me. But when I try to import the original Gantt function as done here ( Hence my question: Is there a way to (easily) pass the required options object to the Any hints welcome! PS: Here is a minimal working example for the react-frappe-gantt wrapper (install with
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The group decided to implement a custom gant chart-type of input and display component |
Beta Was this translation helpful? Give feedback.
The group decided to implement a custom gant chart-type of input and display component