diff --git a/app/static/index.html b/app/static/index.html index e3ac556..bbe9095 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -2645,7 +2645,7 @@
-
+
${cpuData.data && cpuData.data.length > 0 ? `
@@ -2675,7 +2675,7 @@
-
+
${memoryData.data && memoryData.data.length > 0 ? `
@@ -2904,13 +2904,21 @@ // Clear container container.innerHTML = ''; + // Get container dimensions + const containerWidth = container.offsetWidth || 400; + const containerHeight = container.offsetHeight || 200; + // Create Victory chart using React.createElement const chart = React.createElement(Victory.VictoryChart, { - width: 400, - height: 200, + width: containerWidth, + height: containerHeight, theme: Victory.VictoryTheme.material, style: { - parent: { background: '#1E1E1E' } + parent: { + background: '#1E1E1E', + width: '100%', + height: '100%' + } } }, [ React.createElement(Victory.VictoryAxis, { @@ -2970,13 +2978,21 @@ // Clear container container.innerHTML = ''; + // Get container dimensions + const containerWidth = container.offsetWidth || 400; + const containerHeight = container.offsetHeight || 200; + // Create Victory chart using React.createElement const chart = React.createElement(Victory.VictoryChart, { - width: 400, - height: 200, + width: containerWidth, + height: containerHeight, theme: Victory.VictoryTheme.material, style: { - parent: { background: '#1E1E1E' } + parent: { + background: '#1E1E1E', + width: '100%', + height: '100%' + } } }, [ React.createElement(Victory.VictoryAxis, {