### [[2025]]年 - [[2025-06|06月]], [[2025-06-05|<]] [[第157天]] [[2025-06-07|>]] , 金曜日 --- ## 記事 灰 0:35:04 4400 https://www.suruga-ya.jp/product/detail/185037302 1600 https://www.suruga-ya.com/zh-hans/product/detail/185016802?tenpo_cd=400307 1807 https://www.suruga-ya.com/product/detail/185016801?tenpo_cd=400307&branch_number=9000 灰 0:36:14 https://www.suruga-ya.jp/product/detail/ZHOA14982 灰 0:36:21 https://www.suruga-ya.jp/product/detail/ZHORE19335 10180 * 0.054+10 700 * 3 100+100+500 2100 * 0.035+10 700 * 0.06 +10 559+89+52 套现 tongyi oTONGYIamex:: 10220 3860+6360 消耗 Utongyi:: 1000 1000 货 nashiga Onashiga:: 399 399 nashiga amex Oamex:: 10233 3610+6623 iINallYUAN:: 225 收款 Inashiga:: 225 225 ```dataviewjs const d = dv.current() // === 原始字段 === const amex = d.Oamex || 0 const tongyi = d.Otongyi || 0 const nashiga = d.Onashiga || 0 const use_tongyi = d.Utongyi || 0 const use_nashiga = d.Unashiga || 0 const sal_tongyi = d.Stongyi || 0 const sal_nashiga = d.Snashiga || 0 // === 汇总值 === const oOUTall = amex + tongyi + nashiga const oUSEall = use_tongyi + use_nashiga const oSALall = sal_tongyi + sal_nashiga const oALL = oOUTall + oUSEall + oSALall // === Chart 配置 === const chartData = { type: 'doughnut', data: { labels: [ '总货款', '总消耗', '总工资' ], datasets: [ { label: '总支出分类', data: [oOUTall, oUSEall, oSALall], backgroundColor: [ 'rgba(75, 192, 192, 0.6)', // OUT 'rgba(153, 102, 255, 0.6)', // USE 'rgba(255, 159, 64, 0.6)' // SAL ], borderColor: [ 'rgba(75, 192, 192, 1)', 'rgba(153, 102, 255, 1)', 'rgba(255, 159, 64, 1)' ], borderWidth: 1 } ] }, options: { responsive: true, cutout: '50%', plugins: { legend: { position: 'bottom' }, tooltip: { enabled: true }, centerText: { display: true, text: `总支出:¥${oALL.toLocaleString()}` } } }, plugins: [ { id: 'centerText', beforeDraw: function (chart) { const width = chart.width; const height = chart.height; const ctx = chart.ctx; ctx.restore(); const fontSize = (height / 150).toFixed(2); ctx.font = `${fontSize}em sans-serif`; ctx.textBaseline = 'middle'; const text = chart.options.plugins.centerText.text; const textX = Math.round((width - ctx.measureText(text).width) / 2); const textY = height / 2; ctx.fillText(text, textX, textY); ctx.save(); } } ] } window.renderChart(chartData, this.container) ``` 1. 2 2. 3 3. 2 4. 3 5. 4 6. 3 7. 2 [Microsoft Forms](https://forms.office.com/pages/responsepage.aspx?id=19ZBjc42DE6Mbc8sVMOQOVF45W3fPc1Chcj0bymGYClUQjFSVURFUFRZNENZQVZXRDFPSVpZOFZMWi4u&route=shorturl) --- # memos