|
|
@@ -82,7 +82,6 @@ export default {
|
|
|
}
|
|
|
let participantNum = this.list[i].participantNum;
|
|
|
for (let j = 0; j < participantNum.length; j++) {
|
|
|
- names.push(participantNum[j].name);
|
|
|
if (participantNum[j].name == '音乐') {
|
|
|
music1.push(participantNum[j].num);
|
|
|
} else if (participantNum[j].name == '舞蹈') {
|
|
|
@@ -112,8 +111,6 @@ export default {
|
|
|
var chartDom = this.$refs.chart;
|
|
|
var myChart = echarts.init(chartDom);
|
|
|
var option;
|
|
|
- console.log(this.seriesPar);
|
|
|
- var option;
|
|
|
option = {
|
|
|
legend: {
|
|
|
data: names,
|
|
|
@@ -131,7 +128,54 @@ export default {
|
|
|
dataView: {}
|
|
|
}
|
|
|
},
|
|
|
- tooltip: {},
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ axisPointer: {
|
|
|
+ type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
|
|
|
+ },
|
|
|
+ formatter: function(params) {
|
|
|
+ //自定义划过显示样式
|
|
|
+ // console.log(params); //params为滑过显示的数据信息
|
|
|
+ var str = '';
|
|
|
+ for (var i = 0; i < params.length; i++) {
|
|
|
+ // console.log(params);
|
|
|
+ if (i == 0) {
|
|
|
+ str += '<br/>' + '节目数量';
|
|
|
+ str +=
|
|
|
+ '<div style="width:140px;border-top:1px solid #ccc;margin-top:4px;">' +
|
|
|
+ params[i].marker +
|
|
|
+ params[i].seriesName +
|
|
|
+ ':' +
|
|
|
+ params[i].value +
|
|
|
+ '</div >';
|
|
|
+ } else if (i == 5) {
|
|
|
+ str += '报名人数';
|
|
|
+ str +=
|
|
|
+ '<div style="width:140px;border-top:1px solid #ccc;margin-top:4px;">' +
|
|
|
+ params[i].marker +
|
|
|
+ params[i].seriesName +
|
|
|
+ ':' +
|
|
|
+ params[i].value +
|
|
|
+ '</div >';
|
|
|
+ } else {
|
|
|
+ str +=
|
|
|
+ '<div style="width:140px;">' +
|
|
|
+ params[i].marker +
|
|
|
+ params[i].seriesName +
|
|
|
+ ':' +
|
|
|
+ params[i].value +
|
|
|
+ '</div >';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var tooltipHtml =
|
|
|
+ '<div style="width:140px;overflow-y:auto;">' +
|
|
|
+ params[0].axisValue +
|
|
|
+ '年' +
|
|
|
+ str +
|
|
|
+ '</div>';
|
|
|
+ return tooltipHtml;
|
|
|
+ }
|
|
|
+ },
|
|
|
xAxis: {
|
|
|
data: xAxisData,
|
|
|
name: '年份',
|