|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div class="gcharts" :id="id"></div>
|
|
<div class="gcharts" :id="id"></div>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
|
|
+
|
|
<script>
|
|
<script>
|
|
import G2 from "@antv/g2";
|
|
import G2 from "@antv/g2";
|
|
export default {
|
|
export default {
|
|
@@ -41,7 +41,7 @@ export default {
|
|
if(this.charData.length !== 0){
|
|
if(this.charData.length !== 0){
|
|
this.chart = new G2.Chart({
|
|
this.chart = new G2.Chart({
|
|
container: this.id,
|
|
container: this.id,
|
|
- width: 810,
|
|
|
|
|
|
+ width: 510,
|
|
height: 210,
|
|
height: 210,
|
|
});
|
|
});
|
|
this.chart.source(this.charData);
|
|
this.chart.source(this.charData);
|
|
@@ -59,7 +59,7 @@ export default {
|
|
type: "line",
|
|
type: "line",
|
|
},
|
|
},
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
this.chart.line().position("name*value")
|
|
this.chart.line().position("name*value")
|
|
.color('type')
|
|
.color('type')
|
|
.shape('smooth');
|
|
.shape('smooth');
|