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] Switch to unified metric renderer #123797

Closed
flash1293 opened this issue Jan 26, 2022 · 8 comments · Fixed by #126019
Closed

[Lens] Switch to unified metric renderer #123797

flash1293 opened this issue Jan 26, 2022 · 8 comments · Fixed by #126019
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

flash1293 commented Jan 26, 2022

Lens should use the unified metric renderer as well. To make this possible, some additional functionality has to be added to the unified renderer:

@flash1293 flash1293 added technical debt Improvement of the software architecture and operational architecture Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jan 26, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@VladLasitsa
Copy link
Contributor

@flash1293, As I see unified metric renderer has already supported coloring background / number via provided palette. One difference from Lens that in Lens background color appling for all container, but in metric unified renderer only for small area around metric.

In Metric:
image

in Lens
image

  • Should we add new argument in metric expression to allow apply background color for all container?
  • As I mentioned above this is already supported: Color background / number via provided palette, what should we do as part of that task?

@flash1293
Copy link
Contributor Author

@VladLasitsa good point

Should we add new argument in metric expression to allow apply background color for all container?

  • This makes sense to me, I think we should make the current Lens behavior default with an option to switch to the Visualize behavior
  • It seems like the label is smaller in the visualize case, right? Is this configurable already via font argument?

As I mentioned above this is already supported: Color background / number via provided palette, what should we do as part of that task?

  • If it works already nothing to be done here - the next step would be to use the unified renderer from within Lens and remove the Lens specific metric renderer

@VladLasitsa
Copy link
Contributor

VladLasitsa commented Feb 8, 2022

It seems like the label is smaller in the visualize case, right? Is this configurable already via font argument?

That next question: For now we don't have possibility to configure label font. The provided font arg only affects metric. Should we add something like fontLabel arg that allow configru font for label (in that case we should also check that all things which we can provide as font will be applicable) or just labelFontSize is enough?

@flash1293
Copy link
Contributor Author

Having a font arg for the label sounds like the cleanest way to me, but it's more relevant for Canvas than anything else. @crob611 what do you think?

@dej611
Copy link
Contributor

dej611 commented Feb 8, 2022

Consider also this approach from @shahzad31 for font size : #124124

@VladLasitsa
Copy link
Contributor

@dej611, @flash1293 I think we should add labelFont and labelPosition args which cover all needed cases from #124124. Also I will add sub task about that to the description. What do you think?

@flash1293
Copy link
Contributor Author

Consider also this approach from @shahzad31 for font size : #124124

I think it's better to stick with the "regular" way of specifying font like @VladLasitsa suggests as it's exposed in other places in Canvas already.

I think we should add labelFont and labelPosition args

I like this suggestion

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.

4 participants