[Infrastructure UI] Fix disk space usage chart Y axis (#161084)

closes: [#161083](https://github.com/elastic/kibana/issues/161083)

## Summary

This PR fixes the Disk Space Usage Y axis to display the percentage
range from 0% to 100%

<img width="725" alt="image"
src="60051a22-f693-4828-bd7b-b5f0e260cfa4">



### How to test

- Start a local Kibana instance
- Navigate to `Infrastructure` > `Hosts`
- Check the Disk Space Usage chart in the metrics tab
This commit is contained in:
Carlos Crespo 2023-07-04 09:00:43 +02:00 committed by GitHub
parent f516756f2d
commit c1eacbabfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,9 +5,19 @@
* 2.0.
*/
import type { LensChartConfig } from '../../../types';
import type { LensChartConfig, LensLineChartConfig } from '../../../types';
import { getFilters } from './utils';
export const diskSpaceUsageLineChart: LensLineChartConfig = {
extraVisualizationState: {
yLeftExtent: {
mode: 'custom',
lowerBound: 0,
upperBound: 1,
},
},
};
export const diskSpaceUsage: LensChartConfig = {
title: 'Disk Space Usage',
formula: {
@ -20,4 +30,5 @@ export const diskSpaceUsage: LensChartConfig = {
},
},
getFilters,
lineChartConfig: diskSpaceUsageLineChart,
};