edit
This commit is contained in:
@ -337,15 +337,16 @@ export class DatatableDataindexComponent implements OnInit {
|
||||
const chart = new Chart({
|
||||
container: el,
|
||||
autoFit: true,
|
||||
height: 400,
|
||||
|
||||
height: 400
|
||||
});
|
||||
chart.data(data);
|
||||
// 设置坐标轴
|
||||
chart.scale({
|
||||
pre: { alias: '同期业绩完成率', min: 0, max: 1 },
|
||||
pre2: { min: 0, max: 1 },
|
||||
quantity: { min: 0, max: 1000000 },
|
||||
pre: { alias: '同期业绩完成率', min: 0, max: 1, formatter: val => val * 100 + '%' },
|
||||
pre2: { alias: '业绩完成率', min: 0, max: 1, formatter: val => val * 100 + '%' },
|
||||
quantity: { alias: '业绩量 (万)', min: 0, max: 1000000 }
|
||||
});
|
||||
// 设置
|
||||
chart.legend({
|
||||
custom: true,
|
||||
items: [
|
||||
@ -358,9 +359,7 @@ export class DatatableDataindexComponent implements OnInit {
|
||||
grid: null,
|
||||
title: null,
|
||||
label: {
|
||||
formatter: val => {
|
||||
return +val * 100 + '%';
|
||||
}
|
||||
formatter: val => +val * 100 + '%'
|
||||
}
|
||||
});
|
||||
chart.axis('pre2', false);
|
||||
|
||||
Reference in New Issue
Block a user