[Lens] Display the metric title on the dashboard panel (#149662)

## Summary

Closes https://github.com/elastic/kibana/issues/148563

After this [PR](
https://github.com/elastic/kibana/pull/148301) being merged, it will be
easier to add the description info icon and the custom data range to the
new metric. For this reason we decided to also allow the panel title for
now.

On the next minors we are going to hide it from the panel and display
all the aforementioned info on the viz title.
<img width="988" alt="image"
src="https://user-images.githubusercontent.com/17003240/215037834-0f556673-8628-484e-aa32-c34188fc7064.png">

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
This commit is contained in:
Stratoula Kalafateli 2023-01-27 16:50:18 +02:00 committed by GitHub
parent d1b7db4917
commit a3cbb4e75b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -1099,7 +1099,7 @@ describe('metric visualization', () => {
it('implements custom display options', () => {
expect(visualization.getDisplayOptions!()).toEqual({
noPanelTitle: true,
noPanelTitle: false,
noPadding: true,
});
});

View file

@ -636,7 +636,7 @@ export const getMetricVisualization = ({
getDisplayOptions() {
return {
noPanelTitle: true,
noPanelTitle: false,
noPadding: true,
};
},