Our state of the art Gantt chart


Post by rapiduser »

I was wondering if there is a way to add a tooltip for the timeline header columns?

In the attachment below where the yellow arrow is pointing to I'd like to conditionally show a tooltip. This is particular to a use case where day is configured as a ViewPreset and when a user hovers over the header of a day it would show the full date for full context of the date.

TimelineHeader.png
TimelineHeader.png (37.36 KiB) Viewed 653 times

Post by mats »


Post by rapiduser »

mats wrote: Mon Sep 27, 2021 8:45 am

Sure, anything is possible!

Docs for creating a simple tooltip: https://bryntum.com/docs/scheduler/#Core/widget/Tooltip

When tooltip is showing (listen for beforeShow), you can use

https://bryntum.com/docs/scheduler/#Scheduler/view/TimelineBase#property-timeAxisViewModel

and

query for https://bryntum.com/docs/scheduler/#Scheduler/view/model/TimeAxisViewModel#function-getDateFromPosition

Hey Mats,

So where do I actually attach the tooltip to? I have a Gantt instance but I don't explicitly create a scheduler using the scheduler object, I use view presets to set the header contents.


Post by alex.l »

Try to use https://bryntum.com/docs/scheduler/#Core/widget/Tooltip#config-forSelector config?
As example for .b-sch-header-timeaxis-cell.

All the best,
Alex


Post by rapiduser »

alex.l wrote: Mon Sep 27, 2021 2:31 pm

Try to use https://bryntum.com/docs/scheduler/#Core/widget/Tooltip#config-forSelector config?
As example for .b-sch-header-timeaxis-cell.

That worked.

Thanks!


Post Reply