Commit b2e5d42a by 匡雅琴

添加折线图

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