${cpuData.data && cpuData.data.length > 0 ? `
${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, {