Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #54 from swiffer/patch-1
Browse files Browse the repository at this point in the history
allow sum_distinct & fix labels ;)
  • Loading branch information
RichardCzechowski authored Jan 29, 2019
2 parents 8a53427 + 6fa359e commit 930a5b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/subtotal.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/examples/subtotal/subtotal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ const vis: Subtotal = {
case 'count': agg = tpl.sum(intFormat); break
case 'count_distinct': agg = tpl.sum(intFormat); break
case 'sum': agg = tpl.sum(customFormat); break
case 'sum_distinct': agg = tpl.sum(customFormat); break
case 'average': agg = tpl.average(customFormat); break
case 'median': agg = tpl.median(customFormat); break
case 'min': agg = tpl.min(customFormat); break
Expand All @@ -164,7 +165,7 @@ const vis: Subtotal = {
return
}
const aggName = `measure_${i}`
labels[aggName] = config.show_full_field_name ? { label: label1, sublabel: label2 } : { label: label1 }
labels[aggName] = config.show_full_field_name ? { label: label1, sublabel: label2 } : { label: label2 }
aggregatorNames.push(aggName)
aggregators.push(agg([name]))
}
Expand Down

0 comments on commit 930a5b7

Please sign in to comment.