[REACT] ResourceHistogram not displaying expected data - adding calendar helps but not completely
I'm trying to setup a ResourceHistogram that shows when employees are over allocated. I have the ResourceHistogram rendering but the data it renders doesn't match what I'd expect.
Attached is a sample project with a single resource (employee -- Egon Stetmann) that has 5 events.
The event dates:
- 2023-08-15 => 2024-04-10 (units 25, i.e. 25% allocated)
- 2024-02-06 => 2024-09-07 (units 100, i.e. 100% allocated)
- 2024-06-02 => 2030-12-31 (units 50, i.e. 50% allocated)
Expected:
- graph begins at 2023-08-15 green
- graph red at 2024-02-06 until 2024-04-10 (2nd event is 100% allocated, so any collision is red)
- graph green from 2024-04-11 to 2024-06-01
- graph red from 2024-06-02 to 2024-09-07
- graph green from 2024-09-08 to 2030-12-31
Actual:
- graph begins at 2023-08-15 green (as expected!)
- graph red at 2024-02-06 (as expected!) until 2024-07-15 (unexpected, should've been 2024-04-10)
- graph green from 2024-07-16 (unexpected) to 2024-11-29 (unexpected)
- no more data --- even though one of the events should go to 2030-12-31
I noticed that adding calendars to the histogram project sort of helps things:
calendars: {
metaData: {
projectCalendar: "general"
},
rows: [
{
id: "general",
name: "General"
}
]
},
Everything lines up as expected except that the green should go until 2030-12-31. Instead it ends on 2029-06-01. I'm not sure why that helps in the way it does and why it doesn't quite fully resolve things.