File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
containers/Tenant/Diagnostics/TenantOverview/TenantCpu Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ const prepareWidgetData = (
4242 data : PreparedMetricsData ,
4343 options : ChartOptions = { } ,
4444) : YagrWidgetData => {
45- const { dataType} = options ;
45+ const { dataType, scaleRange } = options ;
4646 const defaultDataFormatter = getDefaultDataFormatter ( dataType ) ;
4747
4848 const isDataEmpty = ! data . metrics . length ;
@@ -88,6 +88,8 @@ const prepareWidgetData = (
8888 y : {
8989 type : 'linear' ,
9090 range : 'nice' ,
91+ min : scaleRange ?. min || 0 ,
92+ max : scaleRange ?. max ,
9193 } ,
9294 } ,
9395 axes : {
Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ export type ChartDataType = 'ms' | 'size' | 'percent';
3434
3535export interface ChartOptions {
3636 dataType ?: ChartDataType ;
37+ scaleRange ?: {
38+ min ?: number ;
39+ max ?: number ;
40+ } ;
3741}
3842
3943export type ChartDataStatus = 'loading' | 'success' | 'error' ;
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ export const cpuDashboardConfig: ChartConfig[] = [
1818 metrics : pools . map ( getPoolMetricConfig ) ,
1919 options : {
2020 dataType : 'percent' ,
21+ scaleRange : {
22+ min : 0 ,
23+ max : 1 ,
24+ } ,
2125 } ,
2226 } ,
2327] ;
You can’t perform that action at this time.
0 commit comments