实现效果:

实现代码:
<template>
<div class="sexConstitute">
<div ref="sexConstituteChart" style="width: 350px; height: 40px"></div>
<div class="box">
<div class="left">
男性
<span>{
{
(flowStatisticsInfoVOs.malePercent * 100).toFixed(0) }}%</span>
</div>
<div class="right">
<span>{
{
(flowStatisticsInfoVOs.femalePercent * 100).toFixed(0) }}%</span>
女性
</div>
</div>
</div>
</template>
<script>
import echarts from 'echarts'
export default {
props: {
// flowStatisticsInfoVOs是一个对象 { malePercent:0.5303,femalePercent:0.5303}
flowStatisticsInfoVOs:

本文介绍了如何使用Vue.js框架创建一个展示两项数据对比的图表。通过实例代码,详细讲解了实现过程,帮助读者理解Vue.js在数据可视化方面的应用。
最低0.47元/天 解锁文章
2599

被折叠的 条评论
为什么被折叠?



