[8.x] [TSVB] fix point visibility regression (#202358) (#202639)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[TSVB] fix point visibility regression
(#202358)](https://github.com/elastic/kibana/pull/202358)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Marco
Vettorello","email":"marco.vettorello@elastic.co"},"sourceCommit":{"committedDate":"2024-12-03T09:27:58Z","message":"[TSVB]
fix point visibility regression (#202358)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/200255\r\n\r\nThe regression
was caused by a
[breaking\r\nchange](https://github.com/elastic/elastic-charts/pull/2525)
introduced\r\nby elastic-charts around the `area.points.visible` style,
that passed\r\nfrom a `boolean` to a union of `'always' | 'never' |
'auto'`;","sha":"a7397b2ce23c22e06af246eca59c32c63dc63cdb","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:TSVB","regression","release_note:fix","Team:Visualizations","v9.0.0","v8.16.0","backport:version","v8.17.0","v8.18.0"],"title":"[TSVB]
fix point visibility
regression","number":202358,"url":"https://github.com/elastic/kibana/pull/202358","mergeCommit":{"message":"[TSVB]
fix point visibility regression (#202358)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/200255\r\n\r\nThe regression
was caused by a
[breaking\r\nchange](https://github.com/elastic/elastic-charts/pull/2525)
introduced\r\nby elastic-charts around the `area.points.visible` style,
that passed\r\nfrom a `boolean` to a union of `'always' | 'never' |
'auto'`;","sha":"a7397b2ce23c22e06af246eca59c32c63dc63cdb"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.17","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202358","number":202358,"mergeCommit":{"message":"[TSVB]
fix point visibility regression (#202358)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/200255\r\n\r\nThe regression
was caused by a
[breaking\r\nchange](https://github.com/elastic/elastic-charts/pull/2525)
introduced\r\nby elastic-charts around the `area.points.visible` style,
that passed\r\nfrom a `boolean` to a union of `'always' | 'never' |
'auto'`;","sha":"a7397b2ce23c22e06af246eca59c32c63dc63cdb"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
This commit is contained in:
Kibana Machine 2024-12-03 22:21:02 +11:00 committed by GitHub
parent 5d73f2fca3
commit e8db3845e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ exports[`src/legacy/core_plugins/metrics/public/visualizations/views/timeseries/
"radius": 1,
"stroke": "rgb(0, 156, 224)",
"strokeWidth": 5,
"visible": false,
"visible": "never",
},
}
}

View file

@ -17,7 +17,7 @@ Object {
"radius": 1,
"stroke": "rgb(224, 0, 221)",
"strokeWidth": 1,
"visible": true,
"visible": "always",
},
},
"curve": 7,
@ -41,7 +41,7 @@ Object {
"radius": 0.5,
"stroke": "#000",
"strokeWidth": 5,
"visible": false,
"visible": "never",
},
},
"curve": 9,

View file

@ -27,7 +27,7 @@ export const getAreaStyles = ({ points, lines, color }) => ({
radius: points.radius || 0.5,
stroke: color || DEFAULT_COLOR,
strokeWidth: points.lineWidth || 5,
visible: points.lineWidth > 0 && Boolean(points.show),
visible: points.lineWidth > 0 && Boolean(points.show) ? 'always' : 'never',
},
},
curve: lines.steps ? CurveType.CURVE_STEP_AFTER : CurveType.LINEAR,