From 4e2b3d9e6d3311de074db3d63763d4256db93a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=9D=A8?= <1711467488@qq.com> Date: Sat, 17 Feb 2018 11:39:08 +0800 Subject: [PATCH] no message Former-commit-id: 34ddd538bb6e76b9c618e14e607ff82adc88869c Former-commit-id: 5eb35778e89a2fbf11ecfde9259fdb84443d126c Former-commit-id: 0745abccdb15a4083dff5bfc529aeafca72d6cd0 --- src/components/charts/G2/mixins/G2.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/charts/G2/mixins/G2.js b/src/components/charts/G2/mixins/G2.js index 3147ca90..cbaf7e99 100644 --- a/src/components/charts/G2/mixins/G2.js +++ b/src/components/charts/G2/mixins/G2.js @@ -65,7 +65,9 @@ export default { // 创建图表对象 creatChart () { this.chart = new this.G2.Chart({ + // ref = chart 的元素为图表容器 container: this.$refs.chart, + // 自动宽度 forceFit: this.forceFit, // 高度 // 设置 autoHeight = true 后取 $refs.chart 的高度