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

feat: add getSummaryValues API (close #195, #240) #257

Merged
merged 2 commits into from
Jan 29, 2019

Conversation

dongwoo-kim
Copy link

Please check if the PR fulfills these requirements

  • It's submitted to right branch according to our branching model
  • It's right issue type on title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has description for the breaking change

Description

Add getSummaryValues() method
(works only when the summary option exists)

Usage 1: with columnName

const summaryC1 = grid.getSummaryValues('c1');
console.log(summaryC1);
/*
{
  sum: 1000,
  avg: 200,
  max: 300,
  min: 50,
  cnt: 5
}
*/

Usage 2 : without columnName

const summaryAll = grid.getSummaryValues();
console.log(summaryAll);
/*
{
  c1: {
    sum: 1000,
    avg: 200,
    max: 300,
    min: 50,
    cnt: 5
  },
  c2: {
    sum: 2000,
    avg: 300,
    max: 600,
    min: 80,
    cnt: 5
  }
}
*/

Thank you for your contribution to TOAST UI product. 🎉 😘 ✨

@dongwoo-kim dongwoo-kim changed the title feat: add getSummaryValues API (close #240) feat: add getSummaryValues API (close #195, #240) Jan 28, 2019
@dongwoo-kim dongwoo-kim reopened this Jan 28, 2019
Copy link
Contributor

@sohee-lee7 sohee-lee7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[1/29] 이견 없습니다. 고생하셨습니다 👍

@seonim-ryu
Copy link
Member

[1/29] 저도 이견 없습니다. 👍

@dongwoo-kim dongwoo-kim merged commit b9de2a7 into master Jan 29, 2019
@dongwoo-kim dongwoo-kim deleted the feat/getSummaryValues branch January 29, 2019 07:48
@dongwoo-kim dongwoo-kim added this to the 3.5.0 milestone Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants