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

Another issue with thousands separator #54

Closed
rcknr opened this issue Aug 23, 2018 · 2 comments
Closed

Another issue with thousands separator #54

rcknr opened this issue Aug 23, 2018 · 2 comments

Comments

@rcknr
Copy link

rcknr commented Aug 23, 2018

This time occurs with Value metric. Values are returned as strings with thousands separator which Vue component handles as numbers. Then increaseOrDecrease computed property of BaseValueMetric component is equal to "NaN".

@bonzai
Copy link

bonzai commented Jan 4, 2019

You should provide a valid numeric value in any of the following formats:

class TotalUsers extends Value
{
    public function calculate(Request $request)
    {
        // As integer
        return $this->result(123);

        // As float
        return $this->result(123.45);

        // As string
        return $this->result('123');
        return $this->result('123.45');
    }
}

Formatted numbers (with thousands separator) are not supported.

@bonzai bonzai closed this as completed Jan 4, 2019
@rcknr
Copy link
Author

rcknr commented Jan 5, 2019

This was so long ago I don't remember the specifics but you definitely didn't get what the problem was. Here's another issue for reference, #18.

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

No branches or pull requests

2 participants