no message

Former-commit-id: 759d9fc30b3577fa407465d9bce11b1894cd1827
Former-commit-id: c01f76e995b3a94ebed8c6485978f04f1f312b24
Former-commit-id: ddcd4da77f33fb0330afebe837e3fadd15f44595
This commit is contained in:
李杨
2018-02-19 12:20:36 +08:00
parent cd2ba2e826
commit c21ffa52e0
3 changed files with 25 additions and 8 deletions

View File

@@ -6,7 +6,17 @@ Mock.mock('/api/chart/G2Area', 'post', ({body, type, url}) => {
switch (_body.type) {
// 基础折线图
case 'base': {
return fn.returnMaker(['3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月'].map(x => ({x, y: fn.r()})))
let last = 0
const data = ['3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月'].map(x => ({
x,
y: 0
})).map(e => {
e.y = last + fn.r()
last = e.y
return e
})
last = 0
return fn.returnMaker(data)
}
default:
return {}