Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for column aggregates #289

Open
JerichoCross opened this issue Jul 10, 2024 · 1 comment
Open

Add support for column aggregates #289

JerichoCross opened this issue Jul 10, 2024 · 1 comment
Labels
wontfix This will not be worked on

Comments

@JerichoCross
Copy link

If a column is defined as 'numeric', there should also be an option to specify an aggregate (Sum, Median, Mean etc. or leave null for not required). If one of the columns has one of these defined, add an extra row at the bottom with the appropriate aggregates calculated e.g.

DataTable2(
  columns: [
    DataColumn2(
      label: Text("Name"),
    ).
    DataColumn2(
      label: Text("Age"),
      numeric: true,
      aggregate: ColumnAggregate.mean,
    ),
  ],
),

Would produce:

Name Age
John Smith 28
Steve Jones 31
David Cross 22
27
@maxim-saplin
Copy link
Owner

Thanks for the suggestion. No plans to work on that feature.

This can be easily achieved via custom row. DataTable2 is not intended to be a rich control in traditional sense, it is a think widget with little behind the scenes logic.

@maxim-saplin maxim-saplin added the wontfix This will not be worked on label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants