From 05d655944749d46883b5cd92575fc10ed17c07fa Mon Sep 17 00:00:00 2001 From: Irem Toroslu Date: Sun, 6 Jun 2021 19:48:23 +0200 Subject: [PATCH] reconfiguration of details canvas pages regarding the #78 made the table ,column chart and piechart componants responsive --- .../details/ColumnChartComponent.jsx | 17 +++- .../components/details/PieChartComponent.jsx | 4 +- .../components/details/ScenarioComponent.jsx | 20 +++-- .../details/SelectVariableComponent.jsx | 26 +++--- .../src/components/details/TableComponent.jsx | 14 +-- frontend/src/index.css | 90 ++++++++++++++++++- 6 files changed, 129 insertions(+), 42 deletions(-) diff --git a/frontend/src/components/details/ColumnChartComponent.jsx b/frontend/src/components/details/ColumnChartComponent.jsx index 2a0eea5a..f588c2c6 100644 --- a/frontend/src/components/details/ColumnChartComponent.jsx +++ b/frontend/src/components/details/ColumnChartComponent.jsx @@ -63,7 +63,21 @@ const ColumnChartComponent = () => { // fontSize: theme.typography.chartItemstitle.fontSize, // fontWeight: theme.typography.chartItemstitle.fontWeight // } - } + }, + responsive: [ + { + breakpoint: 300, + options: { + chart: { + width: 500 + }, + legend: { + position: "bottom" + } + } + } + ] + } }; @@ -75,6 +89,7 @@ const ColumnChartComponent = () => { type='bar' color='green' height={350} + /> ); diff --git a/frontend/src/components/details/PieChartComponent.jsx b/frontend/src/components/details/PieChartComponent.jsx index b63b2750..bc1f99ed 100644 --- a/frontend/src/components/details/PieChartComponent.jsx +++ b/frontend/src/components/details/PieChartComponent.jsx @@ -64,7 +64,7 @@ const PieChartComponent = () => { }, responsive: [ { - breakpoint: 1300, + breakpoint: 2400, options: { chart: { height: '300px' @@ -78,7 +78,7 @@ const PieChartComponent = () => { }; return ( -
+
); diff --git a/frontend/src/components/details/ScenarioComponent.jsx b/frontend/src/components/details/ScenarioComponent.jsx index 6e8e0ea7..21a12667 100644 --- a/frontend/src/components/details/ScenarioComponent.jsx +++ b/frontend/src/components/details/ScenarioComponent.jsx @@ -13,7 +13,7 @@ class ScenarioComponent extends Component { console.log(this.props); return ( - + The chosen Model is {this.props.selectedProduct.modelName} - - - + + + - - + + + - -
+ + +
+ +
diff --git a/frontend/src/components/details/SelectVariableComponent.jsx b/frontend/src/components/details/SelectVariableComponent.jsx index b2c2ea75..c6088232 100644 --- a/frontend/src/components/details/SelectVariableComponent.jsx +++ b/frontend/src/components/details/SelectVariableComponent.jsx @@ -57,23 +57,17 @@ class SelectVariableComponent extends Component { -
+
{this.state.variables.map((item) => ( - +
+ +
))}
diff --git a/frontend/src/components/details/TableComponent.jsx b/frontend/src/components/details/TableComponent.jsx index 5f6f41ee..3a45dcae 100644 --- a/frontend/src/components/details/TableComponent.jsx +++ b/frontend/src/components/details/TableComponent.jsx @@ -89,20 +89,10 @@ class TableComponent extends Component { // TODO:left margin value needed to be fixed {/* TODO: dynamic display of product and model */} -
+
Large Power Transformer
-
+
3 Phase GSU transformer
diff --git a/frontend/src/index.css b/frontend/src/index.css index 447b1339..76531705 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -124,7 +124,7 @@ body { font-size: 24px; line-height: 16px; letter-spacing: 0.5px; - margin-left: 40px; + margin-left: 30px; color: #00b300; } /* Reconfiguration of the icon style on the header bar */ @@ -168,7 +168,7 @@ body { font-weight: bold; font-size: 22px; letter-spacing: 0.5px; - margin-left: 0px; + margin-left:15px; color: #000000; margin-bottom:10px; } @@ -182,6 +182,7 @@ body { letter-spacing: 0.5px; color: #000000; margin-top:25px; + margin-left:15px; } /* Reconfiguration of the title style on chart */ @@ -194,12 +195,62 @@ body { color: #000000; } +.ColumnChartItems { + font-family: inherit; + font-style: normal; + font-weight: normal; + font-size: 6px; + margin-left: 0; + color: #000000; + margin-top:10px; + margin-bottom: 10px; +} .ChartItems { font-family: inherit; font-style: normal; font-weight: normal; - font-size: 8px; + font-size: 6px; + margin-left: 0; + color: #000000; + margin-top:10px; + margin-bottom: 10px; +} +.TableTitle { + font-family: inherit; + font-style: normal; + font-weight: bold; + font-size: 22px; + letter-spacing: 0.5px; + color: #000000; + margin-bottom:10px; +} + +.TableSubTitle { + font-family: inherit; + font-style: normal; + font-weight: normal; + font-size: 18px; + letter-spacing: 0.5px; color: #000000; + margin-bottom:10px; + +} + +.TableContainer{ + + background-color: #FFFFFF; + border:2px solid #00b300; + border-color: #00b300; + border-radius: 4px; + cursor: 'pointer'; + /* min-width: 500px; + max-width: 500px; */ + margin-left: 10px; + margin-right:10px; + margin-bottom: 5px; + margin-top:5px; + min-height: 600px; + max-height: 600px; } /* Reconfiguration of the text style on details pages */ @@ -231,6 +282,39 @@ body { color: #000000; } +.CardsContainer { + + background-color: #FFFFFF; + border:2px solid #00b300; + border-color: #00b300; + border-radius: 4px; + cursor: 'pointer'; + min-width: 360; + max-width: 450; + min-height: 400px; + +} + +.PieChartCardsContainer { + + background-color: #FFFFFF; + border:2px solid #00b300; + border-color: #00b300; + border-radius: 4px; + cursor: 'pointer'; + min-width: 300; + max-width: 360; +} +.miniCardContainer { + display: inline-block; + margin-right: 30; + margin-Left:0; + background-color: #FFFFFF; + +} + + + .Separator { border-left: '1px'; /* margin-left: 40;