回答編集履歴
1
CSSの編集に変更しました
answer
CHANGED
@@ -1,13 +1,29 @@
|
|
1
|
-
|
1
|
+
flexが利用可能であれば、次のようにCSSを指定すれば可能です。
|
2
|
-
今のままでは、shopInfoListの要素数だけ<table>が出力されてしまいます。
|
3
2
|
|
3
|
+
```css
|
4
|
+
.chart-graph{
|
4
|
-
|
5
|
+
height:30vh;
|
6
|
+
width: 40vw;
|
7
|
+
}
|
5
8
|
|
9
|
+
.box {
|
10
|
+
display: flex;
|
11
|
+
}
|
12
|
+
```
|
13
|
+
|
6
14
|
```html
|
7
|
-
<
|
15
|
+
<div class="container">
|
8
|
-
|
16
|
+
<div th:each="obj2 : ${shopInfoList}" class="box">
|
17
|
+
<div class="alt-table-responsive">
|
9
|
-
|
18
|
+
<table class="table table-striped">
|
19
|
+
....
|
10
|
-
|
20
|
+
</table>
|
11
|
-
|
21
|
+
</div>
|
22
|
+
<div class="chart-graph">
|
23
|
+
<canvas th:id=${obj2.pastChartId}></canvas>
|
12
|
-
...
|
24
|
+
....
|
13
|
-
```
|
25
|
+
```
|
26
|
+
|
27
|
+
適宜、.alt-table-responsiveやtableでのサイズ指定を調整してください。
|
28
|
+
|
29
|
+

|