Commit 90e96178 by crushh

update: 完成

parent 35edec52
......@@ -125,7 +125,7 @@ let tableHead = [
minWidth: '120',
sortable: 'custom',
formatter: function(row) {
return `<span>${!isNaN(row.connectionIntentionRate) ? row.connectionIntentionRate.toLocaleString() : '- -'}</span>`;
return `<span>${!isNaN(row.connectionIntentionRate) ? row.connectionIntentionRate + '%' : '- -'}</span>`;
}
}
];
......
......@@ -261,26 +261,21 @@ export default {
const chart = new G2.Chart({
container: 'chart-tag',
forceFit: true,
height: 220,
padding: 10
height: 260,
padding: 0
});
chart.source(data.filter(el => el.count > 0));
chart.coord('theta');
chart.legend(false);
chart.coord('theta', {
radius: 0.75,
innerRadius: 0.6
});
chart.legend(null);
chart
.intervalStack()
.position('count')
.color('percent', ['#2d4dd1', '#239EFF', '#14C9C9', '#05B770', '#F69F3E', '#7D59E0'])
.color('label', ['#2d4dd1', '#239EFF', '#14C9C9', '#05B770', '#F69F3E', '#7D59E0'])
.label('percent', val => {
return {
offset: -40,
textStyle: {
fontSize: 10,
textAlign: 'center',
shadowBlur: 2,
shadowColor: 'rgba(0, 0, 0, .45)',
fill: '#fff'
},
formatter: (text, item) => {
return item.point.label + '\n' + item.point.percent;
}
......@@ -313,26 +308,22 @@ export default {
const chart = new G2.Chart({
container: 'chart-record',
forceFit: true,
height: 220,
padding: 10
height: 260,
padding: 0
});
chart.source(data.filter(el => el.count > 0));
chart.coord('theta');
chart.legend(false);
console.log(data);
chart.coord('theta', {
radius: 0.75,
innerRadius: 0.6
});
chart.legend(null);
chart
.intervalStack()
.position('count')
.color('percent', ['#2d4dd1', '#239EFF', '#14C9C9'])
.color('label', ['#2d4dd1', '#239EFF', '#14C9C9'])
.label('percent', () => {
return {
offset: -40,
textStyle: {
fontSize: 10,
textAlign: 'center',
shadowBlur: 2,
shadowColor: 'rgba(0, 0, 0, .45)',
fill: '#fff'
},
formatter: (text, item) => {
return item.point.label + '\n' + item.point.percent;
}
......
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