1. DevTools console show message 'TRIAL VERSION: PRODUCT DEACTIVATED' - whats is mean. Are there any limitation for trial version?(sceenshot: 1.jpg)
2. I have issue with AssignmentChart (screenshot 2.jpg)
My file AssignmentToolTip.js
Ext.define('Gnt.examples.assigningresources.view.AssignmentToolTip', {
extend: 'Ext.ToolTip',
requires : [
'Gnt.examples.assigningresources.view.AssignmentChart'
],
delegate : '.gnt-utilizationrow-resource .gnt-resource-utilization-interval',
showDelay: 0,
hideDelay: 200,
anchor : 'bl',
layout : 'fit',
chartStore: null,
panel : null,
trackMouse: true,
title : 'Hours',
initComponent: function () {
this.chartStore = new Ext.data.Store({
fields: ['name', 'amount']
});
Ext.apply(this, {
items: [
{
xtype : 'assignmentchart',
store : this.chartStore
}
],
listeners: {
beforeshow: this.onMyBeforeShow,
scope : this
}
});
this.callParent(arguments);
},
onMyBeforeShow: function (tip) {
var me = this,
taskStore = me.panel.getStore().getTaskStore(),
summaryEvent = me.panel.getSchedulingView().resolveEventRecord(tip.triggerElement),
originalResource = summaryEvent.getOriginalResource(),
utilizationDayEl = Ext.fly(tip.triggerElement),
intervalStart = new Date(parseInt(utilizationDayEl.getAttribute('data-utilization-interval-start'), 10)),
intervalEnd = new Date(parseInt(utilizationDayEl.getAttribute('data-utilization-interval-end'), 10)),
utilizationInfo = summaryEvent.getUtilizationInfoForInterval(intervalStart),
resourceCalendar = originalResource.getCalendar(),
data = [];
//console.log(resourceCalendar);
Ext.Object.each(utilizationInfo.taskInfo, function (taskId, assignmentUtilizationInfo) {
if (assignmentUtilizationInfo.isUtilized) {
data.push({
name : taskStore.getNodeById(taskId).getName(),
amount: resourceCalendar.convertMSDurationToUnit(assignmentUtilizationInfo.allocationMs, 'h')
});
}
});
//console.log(data);
if (data.length === 0) return false;
// let's get the resource availability value
var resourceAvailability = 0;
// loop over its calendar and summarize availability intervals in the "intervalStart - intervalEnd" timespan
resourceCalendar.forEachAvailabilityInterval(
{
startDate: intervalStart,
endDate : intervalEnd
},
function (start, end) {
resourceAvailability += end - start;
}
);
// output the resource availability plus over-/underallocated hours
this.down('cartesian').setTitle('Resource availability: ' + resourceCalendar.convertMSDurationToUnit(resourceAvailability, 'h') + ' hrs' +
(utilizationInfo.isOverallocated || utilizationInfo.isUnderallocated ?
', ' + (utilizationInfo.isOverallocated ? 'Overallocated' : 'Underallocated') + ': ' + resourceCalendar.convertMSDurationToUnit(Math.abs(utilizationInfo.allocationMs - resourceAvailability), 'h') + ' hrs'
: '')
);
this.setTitle('Hours for ' + originalResource.getName() + ' ' + Ext.Date.format(intervalStart, 'M d') + ' - ' + Ext.Date.format(intervalEnd, 'M d'));
this.chartStore.loadData(data);
//console.log(this.chartStore);
console.table(this.chartStore.data.items);
}
});
Ext.define('Gnt.examples.assigningresources.view.AssignmentChart', {
extend : 'Ext.chart.CartesianChart',
xtype : 'assignmentchart',
height : 250,
width : 430,
theme : {
type : 'muted'
},
insetPadding : '20 20 20 20',
interactions : [ 'itemhighlight' ],
animation : Ext.isIE8 ? false : {
easing : 'backOut',
duration : 500
},
axes : [
{
type : 'numeric',
position : 'left',
fields : 'amount',
minimum : 0,
maximum : 24,
minorTickSteps : 1,
majorTickSteps : 6,
label : {
textAlign : 'right'
},
title : 'Hours',
grid : {
odd : {
fillStyle : 'rgba(255, 255, 255, 0.06)'
},
even : {
fillStyle : 'rgba(0, 0, 0, 0.03)'
}
}
},
{
type : 'category',
position : 'bottom',
fields : 'name'
}
],
series : [ {
type : 'bar',
xField : 'name',
yField : 'amount',
style : {
minGapWidth : 20
},
highlightCfg : {
saturationFactor : 1.5
},
label : {
field : 'amount',
display : 'insideEnd'
}
} ]
});