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

Ability to control precision of DataPoints #7

Closed
percymamedy opened this issue Nov 28, 2019 · 0 comments
Closed

Ability to control precision of DataPoints #7

percymamedy opened this issue Nov 28, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@percymamedy
Copy link
Contributor

Is your feature request related to a problem? Please describe.
After getting the Points back from Graphite it's rounded to 2 Decimal places

Point {#675 ▼
    #time: Carbon @1574849640 {#676 ▶}
    #value: 0.74
 }

Describe the solution you'd like
It could be cool to have the ability to control the precision when building the Points requests. Maybe a precision method on the Target class or Points class itself.

GraphitePoints::addTarget(Target::make('some.target'))
                        ->precision(4)
                        ->render()

or

$target1 = Target::make('some.target')->precision(2);
$target2 = Target::make('some.target2')->precision(4);

GraphitePoints::addTarget($target1)
                        ->addTarget($target2)
                        ->render()
@percymamedy percymamedy self-assigned this Nov 28, 2019
@percymamedy percymamedy added the enhancement New feature or request label Nov 28, 2019
percymamedy added a commit that referenced this issue Dec 4, 2019
- Added a precision method onto Target class.
percymamedy added a commit that referenced this issue Dec 4, 2019
@percymamedy percymamedy removed their assignment Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant