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

Get parameterized list of datapoints #46

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

navneetrai
Copy link
Member

  • Add method to get a parametrized list of datasets
  • Add helper functions to get min, max, average and median datasets

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/Traits/HasChart.php Outdated Show resolved Hide resolved
src/Traits/HasChart.php Outdated Show resolved Hide resolved
src/Traits/HasChart.php Outdated Show resolved Hide resolved
src/Traits/HasChart.php Outdated Show resolved Hide resolved
*
* @return array
*/
public static function getNovaChartjsMaxDataSet($chartName = 'default', $sortBy = null, $limit = 0): array
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about trying to make these calls a little more dynamic? Is there a way we could use __callStatic for these since they're almost identical code? Do you think that would be a good idea here or should we avoid that for reasons I'm not thinking about?

Copy link
Member Author

Choose a reason for hiding this comment

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

@dvanscott These calls are mostly convenience methods for end users. These are not used anywhere in our code directly.

These are also supposed to act as a template for end users it they want to add more such methods for their own use. That was one of the reason I wanted to keep it more readable.

navneetrai and others added 6 commits January 28, 2021 16:09
Co-authored-by: David VanScott <[email protected]>
Co-authored-by: David VanScott <[email protected]>
Co-authored-by: David VanScott <[email protected]>
Co-authored-by: David VanScott <[email protected]>
Co-authored-by: David VanScott <[email protected]>
Co-authored-by: David VanScott <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants