Commit b2e5d42a by 匡雅琴

添加折线图

1 parent 5971b255
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
</div> </div>
<div class="income-box"> <div class="income-box">
<div class="patch-title title">月收入趋势</div> <div class="patch-title title">月收入趋势</div>
<LineChart ref="edunLineChartRef" domId="edunLineChart" :height="'28vh'" :dataList.sync="lineDataList" :tooltipFormatterObj="tooltips" :valName="tooltips.attrName"></LineChart>
</div> </div>
</div> </div>
</template> </template>
...@@ -19,12 +20,14 @@ ...@@ -19,12 +20,14 @@
<script> <script>
import BarChart from './BarChart.vue' import BarChart from './BarChart.vue'
import PriceSwitch from './PriceSwitch.vue' import PriceSwitch from './PriceSwitch.vue'
import LineChart from './LineCharts.vue'
import { edunPriceList } from './constant' import { edunPriceList } from './constant'
export default { export default {
name: 'ViewEdun', name: 'ViewEdun',
components: { components: {
BarChart, BarChart,
PriceSwitch PriceSwitch,
LineChart
}, },
data() { data() {
return { return {
...@@ -78,12 +81,27 @@ export default { ...@@ -78,12 +81,27 @@ export default {
tooltips: { tooltips: {
label: '场次', label: '场次',
attrName: 'actiNum' attrName: 'actiNum'
},
lineDataList: [
{
statMonth: '2021',
actiNum: 400
},
{
statMonth: '2022',
actiNum: 600
},
{
statMonth: '2023',
actiNum: 800
} }
],
} }
}, },
mounted() { mounted() {
this.$refs.edunChartRef.drawBar() this.$refs.edunChartRef.drawBar()
this.$refs.edunLineChartRef.drawLine()
}, },
methods: { methods: {
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
</div> </div>
<div class="income-box"> <div class="income-box">
<div class="patch-title title">月收入趋势</div> <div class="patch-title title">月收入趋势</div>
<LineChart ref="equityLineChartRef" domId="equityLineChart" :height="'28vh'" :dataList.sync="lineDataList" :tooltipFormatterObj="tooltips" :valName="tooltips.attrName"></LineChart>
</div> </div>
</div> </div>
</template> </template>
...@@ -19,12 +20,14 @@ ...@@ -19,12 +20,14 @@
<script> <script>
import BarChart from './BarChart.vue' import BarChart from './BarChart.vue'
import PriceSwitch from './PriceSwitch.vue' import PriceSwitch from './PriceSwitch.vue'
import LineChart from './LineCharts.vue'
import { equityPriceList } from './constant' import { equityPriceList } from './constant'
export default { export default {
name: 'Viewequity', name: 'Viewequity',
components: { components: {
BarChart, BarChart,
PriceSwitch PriceSwitch,
LineChart
}, },
data() { data() {
return { return {
...@@ -92,12 +95,27 @@ export default { ...@@ -92,12 +95,27 @@ export default {
tooltips: { tooltips: {
label: '场次', label: '场次',
attrName: 'actiNum' attrName: 'actiNum'
},
lineDataList: [
{
statMonth: '2021',
actiNum: 400
},
{
statMonth: '2022',
actiNum: 600
},
{
statMonth: '2023',
actiNum: 800
} }
],
} }
}, },
mounted() { mounted() {
this.$refs.equityChartRef.drawBar() this.$refs.equityChartRef.drawBar()
this.$refs.equityLineChartRef.drawLine()
}, },
methods: { methods: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!