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

[Lens] Refactor handling of empty values #68060

Closed
flash1293 opened this issue Jun 3, 2020 · 2 comments · Fixed by #102877
Closed

[Lens] Refactor handling of empty values #68060

flash1293 opened this issue Jun 3, 2020 · 2 comments · Fixed by #102877
Assignees
Labels
Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure technical debt Improvement of the software architecture and operational architecture

Comments

@flash1293
Copy link
Contributor

Currently, empty values in data table cells are handled by the rename_columns expression function. They will be replaced by the string (empty). This is convenient because all charts will handle it correctly, but there are a few downsides to this approach:

Possible solutions

Handle this in each renderer

Have a sanitizeValue function in the renderer itself. This is easy to implement, but leads to code redundancy.

Handle this in the field formatter

We have the ability to pass formatting hints along with the data. This formatter could handle empty values in the same way. If this is implemented as part of the existing field formatters, it would also change behaviors in other apps using the infrastructure (Visualize and Discover) - I'm not sure whether this is a good thing, but consistency could be beneficial. Another approach would be a wrapping formatter just for lens handlings this - e.g { id: 'string', params: { transform: 'lowercase' } } becomes { id: 'lens_default', params: { id: 'string', params: { transform: 'lowercase' } } }

@flash1293 flash1293 added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jun 3, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@flash1293 flash1293 added this to Long-term goals in Lens Jun 3, 2020
@flash1293 flash1293 moved this from Long-term goals to Tech Debt in Lens Jun 3, 2020
@flash1293 flash1293 changed the title Refactor handling of empty values [Lens] Refactor handling of empty values Jun 8, 2020
@flash1293 flash1293 added the technical debt Improvement of the software architecture and operational architecture label Aug 6, 2020
@stratoula
Copy link
Contributor

Now that TSVB also integrates with the color service, we should ensure that (empty) values will be treated treated the same among Lens, TSVB and XY axis #93749 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants