| | |
| | | <!-- 交通安全形势研判分析 --> |
| | | |
| | | <template> |
| | | <RightTitle title="交通安全形势研判分析"> |
| | | <template #top> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #content> |
| | | <div class="charts-container"> |
| | | <div id="analysisChart" ref="analysisChart"></div> |
| | |
| | | ] |
| | | |
| | | }, |
| | | tooltip: {}, |
| | | tooltip: { |
| | | show: true, |
| | | trigger: 'axis', |
| | | backgroundColor: '#000001cc', |
| | | borderWidth: 0, |
| | | textStyle: { |
| | | color: '#4D76B0', |
| | | fontSize: 16 |
| | | }, |
| | | axisPointer: { |
| | | type: 'shadow', |
| | | lable: { |
| | | color: '#000000' |
| | | } |
| | | }, |
| | | padding: [20, 25], |
| | | formatter: function (params) { |
| | | let temp = params[0].name + '<br/>'; |
| | | params.forEach(element => { |
| | | temp += element.seriesName + ':' + `<span style="color:${getColor(element.componentIndex)}">${element.value[`state${element.componentIndex + 1}`]}</span>` + '<br/>'; |
| | | }); |
| | | return temp; |
| | | } |
| | | }, |
| | | grid: { |
| | | left: 0, |
| | | right: 0, |
| | |
| | | color: '#4D76B0', |
| | | margin: 15 |
| | | }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#4d76b033' |
| | | } |
| | | } |
| | | }, |
| | | yAxis: { |
| | | axisLabel: { |
| | | fontSize: 14, |
| | | color: '#4D76B0', |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: '#4d76b033' |
| | | } |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | |
| | | }, |
| | | padding: [20, 25], |
| | | formatter: function (params) { |
| | | return params[0].name + '<br/>' + params[0].seriesName + ':' + `<span style="color:rgba(207, 178, 73, 1)">${params[0].value}</span>` + '<br/>' + params[1].seriesName + ':' + `<span style="color:rgba(43, 176, 109, 1)">${params[1].value}</span>`; |
| | | let temp = params[0].name + '<br/>'; |
| | | params.forEach(element => { |
| | | temp += element.seriesName + ':' + `<span style="color:${element.componentIndex === 1 ? '#2bb06d' : '#cfb249'}">${element.value}</span>` + '<br/>'; |
| | | }); |
| | | return temp; |
| | | } |
| | | }, |
| | | grid: { |
| | |
| | | color: '#4D76B0', |
| | | margin: 15 |
| | | }, |
| | | axisTick: false |
| | | |
| | | axisTick: false, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#4d76b033' |
| | | } |
| | | } |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLabel: { |
| | | fontSize: 14, |
| | | color: '#4D76B0' |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: '#4d76b033' |
| | | } |
| | | } |
| | | }, |
| | | series: [ |
| | |
| | | } |
| | | |
| | | |
| | | const getColor = (index) => { |
| | | let colorList = ['#00a8d9', '#cfb249', '#2bb06d']; |
| | | return colorList[index % colorList.length]; |
| | | } |
| | | |
| | | // 挂载 |
| | | onMounted(() => { |
| | | echartObject = echarts.init(analysisChart.value); |
| | |
| | | border: 1px solid rgba(47, 91, 157, 0.8); |
| | | flex-shrink: 0; |
| | | color: #5B83BD; |
| | | font-family: 'PingFang SC'; |
| | | } |
| | | |
| | | .select-active { |