mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Lens] Thresholds: cap threshold width in suggestions (#112816)
* 🐛 Cap threshold width to 1px in suggestions * 🐛 Remove icons from previews Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
93debf4b52
commit
a251dbf1f8
1 changed files with 14 additions and 1 deletions
|
@ -54,7 +54,20 @@ export function toPreviewExpression(
|
|||
return toExpression(
|
||||
{
|
||||
...state,
|
||||
layers: state.layers.map((layer) => ({ ...layer, hide: true })),
|
||||
layers: state.layers.map((layer) =>
|
||||
layer.layerType === layerTypes.DATA
|
||||
? { ...layer, hide: true }
|
||||
: // cap the threshold line to 1px
|
||||
{
|
||||
...layer,
|
||||
hide: true,
|
||||
yConfig: layer.yConfig?.map(({ lineWidth, ...config }) => ({
|
||||
...config,
|
||||
lineWidth: 1,
|
||||
icon: undefined,
|
||||
})),
|
||||
}
|
||||
),
|
||||
// hide legend for preview
|
||||
legend: {
|
||||
...state.legend,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue