-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Field formatting #2731
Field formatting #2731
Conversation
adb53a5
to
411a500
Compare
LGTM now that that's fixed! |
@lukasolson @simianhacker those issues are fixed. |
|
I'm not finding any issues with this so I'm going to give it my ceremonial LGETM. Congrats! 💃 💃 💃 |
🍭 yummy |
I find myself hard pressed to find more issues with this. Great job man. LGTM. |
Can we change the language used for formatting numbers ? I didn't find how. 2015-05-05 0:09 GMT+02:00 Khalah Jones Golden notifications@github.com:
|
Percentile values are formatted as percents: PS. The Y-Axis is clipped. |
Fixes #2882
Prereq PRs:
This PR adds an initial implementation of field formatters. The default formats are defined in the "stringify" module, and registered with the
registry/field_formats
registry. The formats registered with the registry declare their type compatibility, which makes them an option when choosing the format for a particular field.Every field type has a default field format, which is defined in the
defaultFieldFormats
config variable. This variable defines the default format for field types, but also a default for the default.Modifying the format for a field is done within the index pattern settings. In the field table, a new
format
column shows the name of the format in use for that field. Clicking the cell reveals a select box, which when changed will update the format specified for that field. Choosing the- default -
setting will cause that field to once again inherit the default format for that field type.The non-default format names for each field are stored in the
fieldFormatMap
property on the indexPattern object, helping format names persist across field-list refreshes.