Commit a77d24bd by 姜雷

修改每月注册数据的点击监听

parent a441ba89
......@@ -45,19 +45,12 @@ export default {
showTitle: false,
});
// 图例
this.chart.legend({
position: 'top',
title: null,
marker: 'square',
});
// .axis('count', false)
// .axis('mark', {
// formatter: value => {
// let service = this.serviceList.find(item => item.value === value);
// return service ? `${service.name}` : '';
// },
// });
this.chart
.legend({
position: 'top',
title: null,
marker: 'square',
})
.interval()
.position('month*count')
.color('mark', ['#4e82fb', '#ffc934', '#26c9a8'])
......
......@@ -52,11 +52,14 @@ export default {
.position('month*count')
.color('#4e82fb');
this.chart.render();
this.chart.on('interval:click', this.clickHandle);
this.chart.on('plotclick', this.clickHandle);
},
clickHandle(ev) {
let data = ev.data._origin;
this.changeReportMonthHandle(data.month);
let records = this.chart.getSnapRecords({ x: ev.x, y: ev.y });
if (records && records.length) {
let data = records[0]._origin;
this.changeReportMonthHandle(data.month);
}
},
},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment