-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add a function to allow the min/max values to be formated #1354
Add a function to allow the min/max values to be formated #1354
Conversation
Seems like overkill to have a custom formatter for the max/min, when the center (current) value already has a formatter. Nevertheless, this would solve my issue of not being able to put a $ before the min+max labels on the Gauge. |
Maybe a good compromise is to use the default formatter unless a custom one is provided. |
Default formatter as in the And yeah, it probably is overkill to have the
Would allow the labels to be |
👍 to this feature |
@EspadaV8 Looks good to me. Thanks for the documentation! 👍 💯 Will be happy to add it, but could you please write a unit test? All new features must have at least one test. Please also rebase against Nicely done on not adding the build/minified files, please don't add them. Thank you! |
Also, not entirely convince |
Hi @Aendrew sorry for the delay in replying. I'll try and get this updated shortly. |
8737c41
to
8223963
Compare
Current coverage is 64.09% (diff: 100%)@@ master #1354 diff @@
==========================================
Files 1 1
Lines 4400 4406 +6
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 2818 2824 +6
Misses 1582 1582
Partials 0 0
|
78eece7
to
b629979
Compare
@kenbier I'm not sure if I need to do anything but I'd be happy to fix anything up if it needs it before merging. |
@EspadaV8 Would you mind adding tests then? According to the reviewer's comments and labels thats all that is necessary.
I could really use this feature :) |
Ah, I completely missed that. I'll see if I can add one in, sure. |
@EspadaV8 No worries. Also, you'll be asked to squash your commits and rebase against master after you add the test. |
b629979
to
508a797
Compare
Added new test, rebased and squashed. I've no idea if the test is any good but it passes so hopefully it'll do 😄 I just copied the first test and added what I needed. |
This looks like it's good to merge. Thanks @EspadaV8! |
You're welcome. Glad it painless 😄 |
It would be nice to be able to append/prepend things to the min and max values. Currently the only way to do this is with some JS to inject the text after the gauge graph has been rendered. This adds in a format function similar to the label format function.
I wasn't sure, but with PR do you want the concatenated and minified JS included as well?