-
Notifications
You must be signed in to change notification settings - Fork 143
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
Allow custom formatting of metrics #72
Comments
Great idea! |
Another user reported this in chat today. "I was wondering if there is an equivalent for the 'prefix/suffix' option when drawing a Number in JavaScript SDK 3.0?" |
Units are added to the title, until keen/keen-js#72 is fixed
any thoughts on reopening this to support a generic format() function that lets you do arbitrary transforms so that we don't need special cases for each one? (prefixes, suffixes, # of decimal places, scientific notation, commas like 1,000,000, etc) |
Yup! That exists in dataform today, just needs a sensible input from the keen-js viz setup. On Tue, Jul 22, 2014 at 5:48 PM, inconshreveable notifications@github.com
|
You can't current modify a metric to add something like a '$' in front, or format the number to have commas, control the number of decimal places, etc. If you try to modify this.data.result before calling draw to turn the value into a string, you get the error message "The library you selected does not support this chartType"
It would be nice to basically give users the ability to specify their own "prettyPrint" function. So that they can output a custom formatted value.
The text was updated successfully, but these errors were encountered: