|
22 | 22 | defaultExpandedRowKeys: [1001, 1002], |
23 | 23 | render: ({ row, column, rowIndex }, h) => { |
24 | 24 | if (row["rowKey"] === 1001) { |
25 | | - return ( |
26 | | - <div |
27 | | - id="chart-container" |
28 | | - style="width:800px;height:300px;" |
29 | | - /> |
30 | | - ); |
| 25 | + return <div id="chart-container" style="width:800px;height:300px;" />; |
31 | 26 | } else { |
32 | 27 | return ( |
33 | 28 | <p> |
34 | | - My name is{" "} |
35 | | - <span style="color:#1890ff;"> |
36 | | - {row.name} |
37 | | - </span> |
| 29 | + My name is <span style="color:#1890ff;">{row.name}</span> |
38 | 30 | ,I'm living in {row.address} |
39 | 31 | </p> |
40 | 32 | ); |
|
185 | 177 | name: "蒸发量", |
186 | 178 | type: "bar", |
187 | 179 | data: [ |
188 | | - 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, |
189 | | - 32.6, 20.0, 6.4, 3.3, |
| 180 | + 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3, |
190 | 181 | ], |
191 | 182 | }, |
192 | 183 | { |
193 | 184 | name: "降水量", |
194 | 185 | type: "bar", |
195 | 186 | data: [ |
196 | | - 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, |
197 | | - 48.7, 18.8, 6.0, 2.3, |
| 187 | + 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3, |
198 | 188 | ], |
199 | 189 | }, |
200 | 190 | { |
201 | 191 | name: "平均温度", |
202 | 192 | type: "line", |
203 | 193 | yAxisIndex: 1, |
204 | 194 | data: [ |
205 | | - 2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, |
206 | | - 16.5, 12.0, 6.2, |
| 195 | + 2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2, |
207 | 196 | ], |
208 | 197 | }, |
209 | 198 | ], |
210 | 199 | }; |
211 | 200 |
|
212 | | - let chartInstance = echarts.init( |
213 | | - document.getElementById("chart-container"), |
214 | | - ); |
| 201 | + let chartInstance = echarts.init(document.getElementById("chart-container")); |
215 | 202 | chartInstance.setOption(chartOption); |
216 | 203 | }, |
217 | 204 | }, |
|
0 commit comments