no message

Former-commit-id: 873a2afd2881efe54dbdc525de801e5062d4fa36
Former-commit-id: dbe6c982d002cc37d1a90ff15773390f1202d058
Former-commit-id: 868b1fd3d94060ac719b84be9a4f1c2e5087a959
This commit is contained in:
李杨
2018-01-29 17:34:33 +08:00
parent fbe0e17ae6
commit 0894e110c8
6 changed files with 19 additions and 27 deletions

View File

@@ -19,12 +19,7 @@ export default {
methods: {
// 初始化图表
initHandler () {
this.chart = new this.G2.Chart({
container: this.$refs.chart,
forceFit: this.forceFit,
height: this.G2.DomUtil.getHeight(this.$refs.chart),
padding: this.padding
})
this.creatChart()
this.chart.source(this.data)
this.chart.scale('sales', {
tickInterval: 20

View File

@@ -19,12 +19,7 @@ export default {
methods: {
// 初始化图表
initHandler () {
this.chart = new this.G2.Chart({
container: this.$refs.chart,
forceFit: this.forceFit,
height: this.G2.DomUtil.getHeight(this.$refs.chart),
padding: this.padding
})
this.creatChart()
this.chart.source(this.data)
this.chart.scale('value', {
min: 0

View File

@@ -29,12 +29,7 @@ export default {
},
// 初始化图表
initHandler () {
this.chart = new this.G2.Chart({
container: this.$refs.chart,
forceFit: this.forceFit,
height: this.G2.DomUtil.getHeight(this.$refs.chart),
padding: this.padding
})
this.creatChart()
this.chart.source(this.dvMaker(), {
percent: {
formatter: val => {

View File

@@ -59,6 +59,15 @@ export default {
}
},
methods: {
// 创建图表对象
creatChart () {
this.chart = new this.G2.Chart({
container: this.$refs.chart,
forceFit: this.forceFit,
height: this.G2.DomUtil.getHeight(this.$refs.chart),
padding: this.padding
})
},
// 重绘大小
resize (width, height) {
if (this.chart) {