no message

Former-commit-id: a93fca08c3279a8a135e52ddad8dd3d42626fb17
Former-commit-id: 265098e111bf7be16c22c23b8b22beff40df2726
Former-commit-id: aa78e1a82a4c3f45882e646defe3f59c29bb97d3
This commit is contained in:
李杨
2018-02-19 10:15:00 +08:00
parent 38c76d3233
commit 1e06ffe151
4 changed files with 28 additions and 7 deletions

View File

@@ -16,13 +16,19 @@ export default {
this.creatChart() this.creatChart()
// 本组件的特殊设置 // 本组件的特殊设置
this.chart.source(this.data) this.chart.source(this.data)
this.chart.axis('x', { this.chart.coord('polar')
label: { this.chart.legend({
offset: 12 position: 'right',
} offsetY: 0,
offsetX: -140
})
this.chart.axis(false)
this.chart.interval().position('item*count')
.color('item', this.G2.Global.colors_pie_16)
.style({
lineWidth: 1,
stroke: '#fff'
}) })
this.chart.coord().transpose()
this.chart.interval().position('x*y')
// 渲染图表 // 渲染图表
this.chart.render() this.chart.render()
}, },

View File

@@ -0,0 +1,14 @@
import Mock from 'mockjs'
import * as fn from './_fn'
Mock.mock('/api/chart/G2NightingaleRose', 'post', ({body, type, url}) => {
const _body = JSON.parse(body)
switch (_body.type) {
// 基础南丁格尔玫瑰图
case 'base': {
return fn.returnMaker(['中国', '日本', '美国', '法国', '英国'].map(e => ({item: e, count: 100 + fn.r()})))
}
default:
return {}
}
})

View File

@@ -4,7 +4,7 @@ import * as fn from './_fn'
Mock.mock('/api/chart/G2Pie', 'post', ({body, type, url}) => { Mock.mock('/api/chart/G2Pie', 'post', ({body, type, url}) => {
const _body = JSON.parse(body) const _body = JSON.parse(body)
switch (_body.type) { switch (_body.type) {
// 基础折线 // 基础
case 'base': { case 'base': {
return fn.returnMaker(['中国', '日本', '美国', '法国', '英国'].map(e => ({item: e, count: fn.r()}))) return fn.returnMaker(['中国', '日本', '美国', '法国', '英国'].map(e => ({item: e, count: fn.r()})))
} }

View File

@@ -1,4 +1,5 @@
import './G2Bar' import './G2Bar'
import './G2Column' import './G2Column'
import './G2Line' import './G2Line'
import './G2NightingaleRose'
import './G2Pie' import './G2Pie'