

<template>
<div class="PassengerOringin">
<div class="title">乘客来源</div>
<div id="piechart" style="width:230px;height:230px;"></div>
</div>
</template>
<script>
import echarts from 'echarts'
export default {
name: 'PassengerOringin',
data () {
return {
}
},
methods:{
initChart(){
var total=459
var myChart = echarts.init(document.getElementById('piechart'));
var option = {
title: {
zlevel: 0,
text: [
'{value|' + total + '}',
'{name|总数}',
].join('\n'),
rich: {
value: {

本文介绍了如何使用ECharts库创建环形图,并详细阐述了数据绑定、配置项设置以及动态更新数据的方法,帮助读者掌握在前端项目中实现环形图数据展示的技巧。
最低0.47元/天 解锁文章
1万+

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



