X Enterprises
Card

CardChartFinance

Finance breakdown card with a donut chart and a percentage legend.

CardChartFinance

Finance breakdown card combining a donut chart with a percentage-based legend. Totals are computed automatically from the provided category values.

Component

<XACardChartFinance />

Renders a donut chart alongside a legend showing each category's name, value, and percentage share. The center label and total are derived from the categories array.

<XACardChartFinance
  :categories="[
    { name: 'Marketing', value: 42000, color: '#3b82f6' },
    { name: 'Engineering', value: 68000, color: '#10b981' },
    { name: 'Operations', value: 24000, color: '#f59e0b' },
  ]"
  center-label="Total Spend"
  currency="USD"
/>

Props

PropTypeDefaultDescription
categoriesFinanceCategory[]Required. Segments: { color, name, value }.
centerLabelstring'Total Spent'Donut center label.
currencystring'USD'Currency for the formatted total.
localestring'en-US'Locale for Intl formatting.
heightnumber200Donut chart height in px.
arcWidthnumber10Donut arc stroke width.
padAnglenumber0.1Padding between segments.
radiusnumber4Segment corner radius.

AI Context

component: XACardChartFinance
package: "@xenterprises/nuxt-x-app"
use-when: Budget or spend breakdown where you need a donut chart with a percentage legend; totals are computed automatically from the categories array.
patterns:
  - categories use { name, value, color } shape; totals are computed automatically.
Copyright © 2026