ZoeZ
ZoeZ

Reputation: 1

Deneb Gantt 2.0 - add "Quarters" button?

I'm trying to add a Quarters button alongside the existing Days, Months, and Years time period buttons in David Bacci/s Gantt 2.0.

I've made some progress and had some issues. I need to fix the Months and Quarters, so that when click and wheel, the gantt chart clearly switches to the respective month and quarter views, and transition in correct order.

Currently, when click, Months and Quarters stick together and behave like a single button (both act like Quarters). And when wheel to zoom, it goes in the wrong order: day-(month)-quarter-month-year.

Here is what I've done so far Vega editor with my modified codes

Upvotes: 0

Views: 52

Answers (2)

ZoeZ
ZoeZ

Reputation: 1

In that vein, I played a little with the monthExt, QuarterExt, and modified as below. It appears to work.

{
  "name": "monthExt",
  "update": "[data('xExt')[0]['s']-oneDay ,data('xExt')[0]['s'] + ((ganttWidth-minDayBandwidth)/minDayBandwidth)*2*oneDay]"
},
{
  "name": "quarterExt",
  "update": "[data('xExt')[0]['s']-oneDay, data('xExt')[0]['s'] + ((ganttWidth-minMonthBandwidth)/minMonthBandwidth)*1.5*oneDay]"
},

Upvotes: 0

Robin
Robin

Reputation: 114

Define the time range for a quarter, adjusting the zoom behavior, and ensuring smooth transitions between views:

"quarterExt",
"update": "[data('xExt')[0]['s']-oneDay, data('xExt')[0]['s'] + (ganttWidth / 1.5) * oneDay * 90]"

Upvotes: 0

Related Questions