diff --git a/web/pages/components/chart.tsx b/web/pages/components/chart.tsx
index 89b5dff2b..f7d1a6d83 100644
--- a/web/pages/components/chart.tsx
+++ b/web/pages/components/chart.tsx
@@ -14,6 +14,7 @@ interface ChartProps {
data: number,
color: string,
unit: string,
+ dataCollections?: [],
}
function CustomizedTooltip(props: ToolTipProps) {
@@ -32,21 +33,30 @@ function CustomizedTooltip(props: ToolTipProps) {
}
CustomizedTooltip.defaultProps = defaultProps;
-export default function Chart({ data, color, unit }: ChartProps) {
+export default function Chart({ data, color, unit, dataCollections }: ChartProps) {
const timeFormatter = (tick: string) => {
return timeFormat("%I:%M")(new Date(tick));
};
+ if (dataCollections) {
+ var ticks = dataCollections[0]?.data.map(function (collection) {
+ return collection?.time;
+ })
+ } else {
+ var ticks = data.map(function (item) {
+ return item?.time;
+ });
+ }
return (
cpu:[], disk: [], memory: []; value = %age.