How to show no of hours instead of no of days at Duration ?
2 posts
• Page 1 of 1
How to show no of hours instead of no of days at Duration ?
hi ,
I am using trail version of your product Ext Gantt . i want to show the "no of hours" on duration column instead of "no of days".
Can you suggest how to show no of hours on duration coloum on page load itself?
I am using trail version of your product Ext Gantt . i want to show the "no of hours" on duration column instead of "no of days".
Can you suggest how to show no of hours on duration coloum on page load itself?
- gowthamguptha
- Posts: 32
- Joined: Tue Apr 24, 2012 10:42 am
Re: How to show no of hours instead of no of days at Duratio
Not sure what do you mean by 'page load itself' but you can extend our Duration column in this way :
and then when defining columns :
We should probably think about adding display unit as a config option, so thanks for showing this to us.
- Code: Select all
Ext.define("MyColumnDuration", {
extend : "Gnt.column.Duration",
timeUnit : 'd',
renderer : function (value, meta, task) {
value = task.getDuration(this.timeUnit)
if (!Ext.isNumber(value)) return '';
value = parseFloat(Ext.Number.toFixed(value, this.decimalPrecision));
return value + ' ' + Sch.util.Date.getReadableNameOfUnit(this.timeUnit, value > 1);
}
});
and then when defining columns :
- Code: Select all
Ext.create('MyColumnDuration', {
timeUnit : 'h'
})
We should probably think about adding display unit as a config option, so thanks for showing this to us.
-

jakub - Posts: 1308
- Joined: Wed Jan 25, 2012 7:26 pm
- Location: Warsaw, Poland
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest