Add weighted mean aggregation to DataTable
Description
Adds weightedMean as a total aggregation in DataTable/Column. Should be used with weightCol to specify the column to pull the weight values from for the calculation. If no weightCol supplied, a weight of 1 is used for all values, resulting in the same output as the mean aggregation.
<DataTable data={countries} totalRow=true rows=5>
<Column id=country/>
<Column id=gdp_usd totalAgg=sum/>
<Column id=gdp_growth totalAgg=weightedMean weightCol=gdp_usd fmt='pct2'/>
<Column id=population totalAgg=mean fmt='#,##0"M"'/>
</DataTable>
Checklist
- [x] For UI or styling changes, I have added a screenshot or gif showing before & after
- [x] I have added a changeset
- [x] I have added to the docs where applicable
π¦ Changeset detected
Latest commit: 008ce9205d60f1a3153439f76fa5ef2dc888c12e
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 5 packages
| Name | Type |
|---|---|
| @evidence-dev/core-components | Patch |
| evidence-docs | Patch |
| @evidence-dev/components | Patch |
| @evidence-dev/evidence | Patch |
| evidence-test-environment | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git βοΈ
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Feb 28, 2024 10:54pm |
Deploy Preview for evidence-development-workspace ready!
| Name | Link |
|---|---|
| Latest commit | 008ce9205d60f1a3153439f76fa5ef2dc888c12e |
| Latest deploy log | https://app.netlify.com/sites/evidence-development-workspace/deploys/65dfb974b7d31200082b09ea |
| Deploy Preview | https://deploy-preview-1635--evidence-development-workspace.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Not sure why all of the changesets are showing as deleted with this branch, this might need to have origin/next merged in
Can this be merged
Just attempting to get rid of the deleted changesets then will be good to go
@ItsMeBrianD i think this might be caused by main not being merged back into next?
I'm at a loss for how to remove the deleted changesets - I've merged with next and synced, but those changes don't seem to be taking effect
solved?
That did most of it! Now Iβm just not sure why Cormickβs changes are showing up here - they were already merged to next