-
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
Agg configs should support formatting options or field formatters #57154
Comments
Pinging @elastic/kibana-app-arch (Team:AppArch) |
per visualization formatting should be applied to the visualization function rather than aggConfigs which is used in the data fetching. This way its possible to configure formatting for visualizations no matter where they get their data from. kibana charts already have this option thru setting format on the dimension parameters (like metric or buckets) For example the
to get the serialized version of fieldFormat you can use the |
@ppisljar Agg configs is already using index pattern information to find the formatter, and is already passing the formatter information to the visualization. It seems like making this the responsibility of the visualization will introduce even more inconsistency, as there are more visualizations than there are data sources. |
visualization is not provided aggconfig information (at least not for visualize visualizations) as that is query specific information, and actual visualizations could receive its data from other sources (for example visualize editor (or rather visualize embeddable) makes sure that the format is set correctly according to the information provided off index pattern (that currently happens in |
I think your comment is explaining how it currently works, but what is your proposal for doing per-visualization formatting? |
i suggest that in case visualizations want to override the format, they pass custom format information to |
closing this for now as lens is continuing with alternate approach |
@ppisljar this is not about Lens, this is about the default visualize apps |
there even more, we will not be providing formatting overrides on the aggconfigs, they can already be provided on each visualize chart function (or if in some its missing it can be added to those) |
Agg configs already have the ability to have formatting based on their configuration, but this isn't exposed in a way that can be used programmatically or in any UI. This prevents our users from setting per-visualization formatters. We are working around this limitation in Lens by using Expression datatable formatting hints with a format selector that uses a new function to change
datatable.formatHint
to whatever we want it to be.This level of control over formatting seems like something that should be brought into agg configs, potentially as another
param
. The basic requirement is that aformat
parameter can be set for a specific aggregation in theesaggs
expression function, which would be used by visLib and Lens.cc @ppisljar
The text was updated successfully, but these errors were encountered: