|
|
@@ -225,26 +225,7 @@ const multiLineChartOption = (xAxisData, series) => ({
|
|
225
|
225
|
}))
|
|
226
|
226
|
})
|
|
227
|
227
|
|
|
228
|
|
-const lineChartOption = (data, color, title) => ({
|
|
229
|
|
- grid: { left: '10%', top: '15%', right: '5%', bottom: '15%', containLabel: true },
|
|
230
|
|
- xAxis: { type: 'category', data: xAxisData, axisLine: { lineStyle: { color: '#999' } }, axisLabel: { fontSize: 10, color: '#666' } },
|
|
231
|
|
- yAxis: { type: 'value', axisLine: { lineStyle: { color: '#999' } }, axisLabel: { fontSize: 10, color: '#666' }, splitLine: { lineStyle: { color: '#eee' } } },
|
|
232
|
|
- series: [{ name: title, type: 'line', smooth: true, symbol: 'circle', symbolSize: 6, data: data, itemStyle: { color: color }, lineStyle: { color: color } }]
|
|
233
|
|
-})
|
|
234
|
228
|
|
|
235
|
|
-const areaChartOption = (data, color) => ({
|
|
236
|
|
- grid: { left: '10%', top: '15%', right: '5%', bottom: '15%', containLabel: true },
|
|
237
|
|
- xAxis: { type: 'category', data: xAxisData, axisLine: { lineStyle: { color: '#999' } }, axisLabel: { fontSize: 10, color: '#666' } },
|
|
238
|
|
- yAxis: { type: 'value', axisLine: { lineStyle: { color: '#999' } }, axisLabel: { fontSize: 10, color: '#666' }, splitLine: { lineStyle: { color: '#eee' } } },
|
|
239
|
|
- series: [{ type: 'line', smooth: true, symbol: 'circle', symbolSize: 6, data: data, itemStyle: { color: color }, lineStyle: { color: color }, areaStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: color + '40' }, { offset: 1, color: color + '10' }]) } }]
|
|
240
|
|
-})
|
|
241
|
|
-
|
|
242
|
|
-const barChartOption = (data, color) => ({
|
|
243
|
|
- grid: { left: '15%', top: '15%', right: '5%', bottom: '15%', containLabel: true },
|
|
244
|
|
- xAxis: { type: 'category', data: data.map(d => d.name), axisLine: { lineStyle: { color: '#999' } }, axisLabel: { fontSize: 10, color: '#666' } },
|
|
245
|
|
- yAxis: { type: 'value', axisLine: { lineStyle: { color: '#999' } }, axisLabel: { fontSize: 10, color: '#666' }, splitLine: { lineStyle: { color: '#eee' } } },
|
|
246
|
|
- series: [{ type: 'bar', data: data.map(d => d.value), itemStyle: { color: color }, barWidth: 20 }]
|
|
247
|
|
-})
|
|
248
|
229
|
|
|
249
|
230
|
const horizontalBarChartOption = (data, color) => ({
|
|
250
|
231
|
grid: { left: '20%', top: '15%', right: '5%', bottom: '15%', containLabel: true },
|