diff --git a/frontend/src/pages/modelServing/screens/metrics/MetricsChart.tsx b/frontend/src/pages/modelServing/screens/metrics/MetricsChart.tsx index d4b38e2001..8966300a5a 100644 --- a/frontend/src/pages/modelServing/screens/metrics/MetricsChart.tsx +++ b/frontend/src/pages/modelServing/screens/metrics/MetricsChart.tsx @@ -40,7 +40,6 @@ import { import { convertTimestamp, createGraphMetricLine, - defaultDomainCalculator, formatToShow, getThresholdData, useStableMetrics, @@ -63,7 +62,7 @@ const MetricsChart: React.FC = ({ color, metrics: unstableMetrics, thresholds = [], - domain = defaultDomainCalculator, + domain, toolbar, type = MetricsChartTypes.AREA, isStack = false, @@ -189,7 +188,7 @@ const MetricsChart: React.FC = ({ { @@ -32,8 +31,9 @@ const ModelGraphs: React.FC = () => { translatePoint: per100, }, ]} + color="blue" title="Http requests (x100)" - theme={SUCCESS_FAIL_CHART_THEME} + isStack /> diff --git a/frontend/src/pages/modelServing/screens/metrics/ServerGraphs.tsx b/frontend/src/pages/modelServing/screens/metrics/ServerGraphs.tsx index 56b5b63674..b2d59c1447 100644 --- a/frontend/src/pages/modelServing/screens/metrics/ServerGraphs.tsx +++ b/frontend/src/pages/modelServing/screens/metrics/ServerGraphs.tsx @@ -32,6 +32,7 @@ const ServerGraphs: React.FC = () => { }} color="blue" title="Http requests (x100)" + isStack /> diff --git a/frontend/src/pages/modelServing/screens/metrics/const.ts b/frontend/src/pages/modelServing/screens/metrics/const.ts index 9c0ff82886..0cc70a65f7 100644 --- a/frontend/src/pages/modelServing/screens/metrics/const.ts +++ b/frontend/src/pages/modelServing/screens/metrics/const.ts @@ -88,6 +88,7 @@ const themeProps = { chart: { colorScale }, group: { colorScale }, legend: { colorScale }, + stack: { colorScale }, }; export const SUCCESS_FAIL_CHART_THEME = mergeTheme(ChartThemeColor.default, themeProps); diff --git a/frontend/src/pages/modelServing/screens/metrics/utils.tsx b/frontend/src/pages/modelServing/screens/metrics/utils.tsx index 491e9f12c6..3f86cf1bd7 100644 --- a/frontend/src/pages/modelServing/screens/metrics/utils.tsx +++ b/frontend/src/pages/modelServing/screens/metrics/utils.tsx @@ -14,7 +14,6 @@ import { import { QueryTimeframeStep } from '~/pages/modelServing/screens/const'; import { BiasSelectOption, - DomainCalculator, GraphMetricLine, GraphMetricPoint, MetricChartLine, @@ -170,10 +169,6 @@ export const useStableMetrics = ( return metricsRef.current; }; -export const defaultDomainCalculator: DomainCalculator = (maxYValue) => ({ - y: maxYValue === 0 ? [0, 1] : [0, maxYValue], -}); - export const getBreadcrumbItemComponents = (breadcrumbItems: BreadcrumbItemType[]) => breadcrumbItems.map((item) => (