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

[MetricVis] Add possibility to configure label font and position in metric unified renderer #125251

Conversation

VladLasitsa
Copy link
Contributor

Part of: #123797

Summary

  • adds labelFont and LabelPosition args in metric expression.
My.Canvas.Workpad.-.Kibana.1.mp4

@VladLasitsa
Copy link
Contributor Author

@elasticmachine merge upstream

@VladLasitsa VladLasitsa self-assigned this Feb 11, 2022
@VladLasitsa VladLasitsa changed the title Add possibility to configure label font and position in metric unified renderer [MetricVis] Add possibility to configure label font and position in metric unified renderer Feb 14, 2022
Copy link
Contributor

@Kuznietsov Kuznietsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code mostly LGTM 👍
Only a couple of issues should be addressed.
@VladLasitsa, thanks for your efforts.

Copy link
Contributor

@Kuznietsov Kuznietsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM 👍 Thanks, @VladLasitsa, good job 😃

@VladLasitsa VladLasitsa added backport:skip This commit does not require backporting Feature:MetricVis Metric visualization feature release_note:skip Skip the PR/issue when compiling release notes v8.2.0 Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Feb 14, 2022
@VladLasitsa VladLasitsa marked this pull request as ready for review February 14, 2022 21:10
@VladLasitsa VladLasitsa requested review from a team as code owners February 14, 2022 21:10
@elasticmachine
Copy link
Contributor

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

@VladLasitsa
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
expressionMetricVis 42 44 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
expressionMetricVis 10.0KB 10.1KB +125.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
expressionMetricVis 0 1 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
expressionMetricVis 7.1KB 8.1KB +1.0KB
Unknown metric groups

API count

id before after diff
expressionMetricVis 42 44 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @VladLasitsa

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and this looks pretty good to me, LGTM

Side note: To be able to use it for Visualize / Lens, the unified renderer needs to be able to pick up formatting from the table, seems like this is not the case yet:
Screenshot 2022-02-15 at 13 08 02

kibana | kibana_context savedSearchId=null timeRange={timerange from="now-7d" to="now"} | esaggs index={indexPatternLoad id="90943e30-9a47-11e8-b64d-95841ca0b247"} aggs={aggTerms id="0" enabled=true schema="segment" field="extension.keyword" orderBy="1" order="desc" size=5 otherBucket=true otherBucketLabel="Other" missingBucket=false missingBucketLabel="(missing value)"} aggs={aggAvg id="1" enabled=true schema="metric" field="bytes"} metricsAtAllLevels=false partialRows=false |
metricVis metric={visdimension accessor="col-1-1"} bucket={visdimension accessor="col-0-0"} showLabels=true labelPosition="top" labelFont={font size=24 align="left"} 
   | render

@VladLasitsa VladLasitsa merged commit cf25ac3 into elastic:main Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:MetricVis Metric visualization feature release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants