Our state of the art Gantt chart


Post by thijs4ef »

Hi,

We use the groupFeature in the resourcehistogram and the showBarTip is enabled.
The tooltip is not working for groups:

Schermafbeelding 2021-10-15 095655.png
Schermafbeelding 2021-10-15 095655.png (32.69 KiB) Viewed 556 times

The console is not throwing any errors and the problem occurs in all of our datasets.
I tried reproducing the behavior in the examples but there it works fine:

import { Gantt, ProjectModel, ResourceHistogram, Splitter, Scheduler } from '../../build/gantt.module.js?453898';
import shared from '../_shared/shared.module.js?453898';

const project = window.project = new ProjectModel({
    startDate : '2019-01-16',
    endDate   : '2019-02-13',

transport : {
    load : {
        url : '../_datasets/launch-saas.json'
    }
},

autoLoad : true,

// This config enables response validation and dumping of found errors to the browser console.
// It's meant to be used as a development stage helper only so please set it to false for production systems.
validateResponse : true
});

const gantt = new Gantt({
    project,

dependencyIdField       : 'sequenceNumber',
resourceImageFolderPath : '../_shared/images/users/',

appendTo : 'container',
features : {
    labels : {
        left : {
            field  : 'name',
            editor : {
                type : 'textfield'
            }
        }
    }
},

viewPreset  : 'weekAndDayLetter',
columnLines : true,

columns : [
    { type : 'name', width : 280 },
    { type : 'resourceassignment', showAvatars : true, width : 170 }
],

startDate : '2019-01-11'
});

new Splitter({
    appendTo : 'container'
});

const scheduler = new Scheduler({
    appendTo         : 'container',
    project,
    rowHeight        : 50,
    barMargin        : 5,

columns : [
    { text : 'Name', field : 'name', width : 130 }
]
});

const histogram = window.histogram = new ResourceHistogram({
    appendTo          : 'container',
    project,
    hideHeaders       : false,
    
rowHeight : 25, showBarTip : true, showBarText: true, resourceImagePath : '../_shared/images/users/', features : { scheduleTooltip : false, group : { field : 'city' } }, columns : [ { type : 'resourceInfo', field : 'name', showEventCount : false, flex : 1 } ], tbar : { cls : 'histogram-toolbar', height : '3em', items : [ { type : 'checkbox', ref : 'showBarText', text : 'Show bar texts', tooltip : 'Check to show resource allocation in the bars', checked : true, onAction : 'up.onShowBarTextToggle' }, { type : 'checkbox', ref : 'showMaxEffort', text : 'Show max allocation', tooltip : 'Check to display max resource allocation line', checked : true, onAction : 'up.onShowMaxAllocationToggle' }, { type : 'checkbox', ref : 'showBarTip', text : 'Enable bar tooltip', tooltip : 'Check to show tooltips when moving mouse over bars', checked : true, onAction : 'up.onShowBarTipToggle' } ] }, onShowBarTextToggle({ source }) { histogram.showBarText = source.checked; }, onShowMaxAllocationToggle({ source }) { histogram.showMaxEffort = source.checked; }, onShowBarTipToggle({ source }) { histogram.showBarTip = source.checked; } }); scheduler.addPartner(gantt); histogram.addPartner(scheduler);

The config we use is the same as the config above.
I also tried reproducing it in one of the react examples and there it also works fine.
Any suggestions on where to look next? :)

Thanks!


Post by Maxim Gorkovsky »

Hello.
This tooltup suggests you do not have scheduler pro (or gantt) locale imported, or it is unreachable for some reason. Do you use custom locales? If you cannot reproduce this on examples/react demos, where do you see this problem? Can you give us runnable test case to check?


Post by thijs4ef »

We updated the gantt locale and now its working! Thanks


Post Reply