Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
groupByDurationEffortDriven() {
this.dataviewObj.setGrouping([
{
getter: 'duration',
formatter: (g) => {
return `Duration: ${g.value} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
aggregateCollapsed: true,
lazyTotalsCalculation: true
},
{
getter: 'effortDriven',
formatter: (g) => {
return `Effort-Driven: ${(g.value ? 'True' : 'False')} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Avg('percentComplete'),
new Aggregators.Sum('cost')
],
collapsed: true,
lazyTotalsCalculation: true
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
aggregateCollapsed: true,
lazyTotalsCalculation: true
},
{
getter: 'effortDriven',
formatter: (g) => {
return `Effort-Driven: ${(g.value ? 'True' : 'False')} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Avg('percentComplete'),
new Aggregators.Sum('cost')
],
collapsed: true,
lazyTotalsCalculation: true
}
]);
}
groupByDuration() {
this.dataviewObj.setGrouping({
getter: 'duration',
formatter: (g) => {
return `Duration: ${g.value} <span style="color:green">(${g.count} items)</span>`;
},
comparer: (a, b) => {
return Sorters.numeric(a.value, b.value, SortDirectionNumber.asc);
},
aggregators: [
new Aggregators.Avg('percentComplete'),
new Aggregators.Sum('cost')
],
aggregateCollapsed: false,
lazyTotalsCalculation: true
});
}
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
aggregateCollapsed: true,
lazyTotalsCalculation: true
},
{
getter: 'effortDriven',
formatter: (g) => {
return `Effort-Driven: ${(g.value ? 'True' : 'False')} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Avg('percentComplete'),
new Aggregators.Sum('cost')
],
collapsed: true,
lazyTotalsCalculation: true
}
]);
}
return `Duration: ${g.value} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
aggregateCollapsed: true,
lazyTotalsCalculation: true
},
{
getter: 'effortDriven',
formatter: (g) => {
return `Effort-Driven: ${(g.value ? 'True' : 'False')} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
lazyTotalsCalculation: true
},
{
getter: 'percentComplete',
formatter: (g) => {
return `% Complete: ${g.value} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Avg('percentComplete')
],
aggregateCollapsed: true,
collapsed: true,
lazyTotalsCalculation: true
}
groupByDurationOrderByCount(aggregateCollapsed) {
this.dataviewObj.setGrouping({
getter: 'duration',
formatter: (g) => {
return `Duration: ${g.value} <span style="color:green">(${g.count} items)</span>`;
},
comparer: (a, b) => {
return a.count - b.count;
},
aggregators: [
new Aggregators.Avg('percentComplete'),
new Aggregators.Sum('cost')
],
aggregateCollapsed,
lazyTotalsCalculation: true
});
}
groupByDurationEffortDriven() {
this.dataviewObj.setGrouping([
{
getter: 'duration',
formatter: (g) => {
return `Duration: ${g.value} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
aggregateCollapsed: true,
lazyTotalsCalculation: true
},
{
getter: 'effortDriven',
formatter: (g) => {
return `Effort-Driven: ${(g.value ? 'True' : 'False')} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Avg('percentComplete'),
new Aggregators.Sum('cost')
],
collapsed: true,
lazyTotalsCalculation: true
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
aggregateCollapsed: true,
lazyTotalsCalculation: true
},
{
getter: 'effortDriven',
formatter: (g) => {
return `Effort-Driven: ${(g.value ? 'True' : 'False')} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
lazyTotalsCalculation: true
},
{
getter: 'percentComplete',
formatter: (g) => {
return `% Complete: ${g.value} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Avg('percentComplete')
],
aggregateCollapsed: true,
collapsed: true,
lazyTotalsCalculation: true
}
]);
groupByDurationEffortDrivenPercent() {
this.dataviewObj.setGrouping([
{
getter: 'duration',
formatter: (g) => {
return `Duration: ${g.value} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
aggregateCollapsed: true,
lazyTotalsCalculation: true
},
{
getter: 'effortDriven',
formatter: (g) => {
return `Effort-Driven: ${(g.value ? 'True' : 'False')} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
lazyTotalsCalculation: true
},
{
groupByDurationEffortDrivenPercent() {
this.dataviewObj.setGrouping([
{
getter: 'duration',
formatter: (g) => {
return `Duration: ${g.value} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
aggregateCollapsed: true,
lazyTotalsCalculation: true
},
{
getter: 'effortDriven',
formatter: (g) => {
return `Effort-Driven: ${(g.value ? 'True' : 'False')} <span style="color:green">(${g.count} items)</span>`;
},
aggregators: [
new Aggregators.Sum('duration'),
new Aggregators.Sum('cost')
],
lazyTotalsCalculation: true
},