Open watery opened 1 year ago
Configuring the timeWindow
seems to have an effect on the timetable area, so with:
const config = {
scrollableHorizonFactor: 1,
type: Gantt.type.ACTIVITY_CHART,
data: {
timeWindow: {
data: {
start: '2023-04-01 00:00:00',
end: '2023-05-16 00:00:00',
},
},
dateFormat : "yyyy-MM-dd HH:mm:ss",
The whole chart can be centered and maximized so there's almost no need for horizontal scrolling.
This can be seen in the Activity Chart example:
By scrolling to the left of the first activity, a lot of days are present, but empty; the same is rendered to the right, after the last activity.
I've tracked down this behavoiur to these lines:
https://github.com/IBM/gantt-chart/blob/f72eea31bd4208131050c7110c2e4e534a26dc55/packages/ibm-gantt-chart/src/jquery/timeline/timeline.js#L38-L41
Where
scrollableHorizonFactor
is used to calculate the (vis) Timeline componentstart
andend
parameters from the activity times. It can be configured too, thus giving it a value of e.g. 1.2 brings the component to a much narrow size:A couple of notes: