v-charts对label数字进行格式化
html代码:
<ve-histogram :data="enterpriseNumAverageData" :settings="enterpriseNumAverageSettings" :extend="extend" ref="chart3"></ve-histogram>
js代码:
enterpriseNumAverageSettings: { showLine: ['项目平均用款天数(已回本)'], axisSite: { right: ['项目平均用款天数(已回本)'] }, yAxisType: ['normal', 'normal'], yAxisName: ['单位:元', '单位:天'], }, extend: { series: { label: { show: true, position: "top", formatter: function (params) { if (params.componentSubType == "bar") { let value = params.data; return top.learun.numFilter(value, 2); } } }, } }