Our pure JavaScript Scheduler component


Post by miltonarcos »

Hi,

Is there an example of adding a tooltip for resources?

For example, I'd like to show to show details about Mike when hovering over. Same for Linda and Don.

11.png
11.png (19.99 KiB) Viewed 779 times

Thanks


Post by mats »


Post by adem »

Did you get anywhere with this tooltip. I am trying to get that to work on a tree resource.
The resourceStore is populated and assigned in the ts file.

It errors out when i try it

<bryntum-scheduler #scheduler
...
                   [columns]="[ { field : 'name' , text : 'Name' , width : 200 , type : 'tree',  tooltipRenderer : ({ record }) => 'tooltip test'} ]"
...></bryntum-scheduler>

Error: Uncaught (in promise): Error: Template parse errors:
Parser Error: Missing expected : at column 95 in [[ { field : 'name' , text : 'Name' , width : 200 , type : 'tree' } ]] in ng:///RoomPlannerComponent/template.html@126:30 ("tum-scheduler #scheduler

               [barMargin]="barMargin"

               [columns]="[ERROR ->][ { field : 'name' , text : 'Name' , width : 200 , type : 'tree', tooltipRenderer : ({ record }) => '"): ng:///RoomPlannerComponent/template.html@126:30

Post by mats »

Looks like you have a syntax error somewhere, please upload a small test case.


Post by miltonarcos »

@adem I've still go this on my to do list. It wasn't high priority but I still plan to do it. Feel free to post any helpful tips as you implement the tooltip. Thanks!


Post by adem »

In the end we could not do it via the html file, it all went into the ts file

So the html remained without the renderer

<bryntum-scheduler #scheduler
...
                   [columns]="[ { field : 'name' , text : 'Name' , width : 200 , type : 'tree'} ]"
...></bryntum-scheduler>

in the component.ts

  areaTooltipRenderer = (record, tip) => {
    return record.record.AreaName;
  }

  features = {
    tree: true,
    cellTooltip: {
      tooltipRenderer: this.areaTooltipRenderer
    }
  };

Post by mats »

So, all working according to your needs now?


Post by adem »

Yes thanx mats. The doc was misleading, well at least in the angular world. We got the hint it was in the ts file with this post viewtopic.php?f=44&t=17541


Post Reply