-
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
[Lens] Waffle - add "show values in legend" configuration property #120471
Conversation
}} | ||
onDisplayChange={onLegendDisplayChange} | ||
valueInLegend={shouldShowValuesInLegend(layer, state.shape)} | ||
renderValueInLegendSwitch={Boolean(PartitionChartsMeta[state.shape]?.legend?.showValues)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flash1293 @ghudgins added "Show Value" for Waffle only. What are your thoughts on adding this property for other partition charts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see any downsides to allowing this. on the mosaic specifically i'm not sure it makes sense to display overall metrics in the legends given you aren't visualizing that metric but maybe it's a nice piece of extra information when you aren't hovering?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for just allowing this for waffle for now.
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
@@ -44,6 +45,11 @@ export const isPartitionShape = (shape: PieChartTypes | string) => | |||
export const isTreemapOrMosaicShape = (shape: PieChartTypes | string) => | |||
['treemap', 'mosaic'].includes(shape); | |||
|
|||
export const shouldShowValuesInLegend = (layer: PieLayerState, shape: PieChartTypes) => | |||
layer.showValuesInLegend !== undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha.... good point, I've missed that. Thank you so much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for the weird state transition
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test Failures
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @alexwizp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Chrome and works as expected. It preserves the setting when switching between partition charts, but doesn't have impact on other types so I think it is fine 👌🏼
…lastic#120471) * [Lens] Mosaic - add show values in legend configuration property for Waffle chart type * add tests * resolve comments Co-authored-by: Kibana Machine <[email protected]>
Summary
[Lens] Waffle - add "show values in legend" configuration property
This PR address the following comment #119339 (review):
Screens:
Show Value configuration property was added