X Enterprises
Card

CardRevenue

Revenue metric card with an embedded area sparkline and optional comparison value.

CardRevenue

Revenue metric card that combines a summary value with an embedded area sparkline and an optional comparison row.

Component

<XACardRevenue />

Revenue metric card with an embedded area sparkline, name, value, and optional comparison row.

<XACardRevenue
  name="Net Revenue"
  value="$124,800"
  :data="revenueData"
  :categories="{ revenue: { name: 'Revenue', color: '#3b82f6' } }"
  comparison-label="vs last month"
  comparison-value="+12%"
/>

Props

PropTypeDefaultDescription
namestringRequired. Metric name.
valuestring | numberRequired. Formatted metric value.
dataChartDataItem[]Required. Time-series data array ({ date, ...values }).
categoriesRecord<string, { name: string; color: string }>Required. Chart category definitions.
comparisonLabelstring''Label for the comparison row.
comparisonValuestring | number''Value for the comparison row.
heightnumber90Chart height in px.
xNumTicksnumber4Number of X-axis ticks.
yNumTicksnumber1Number of Y-axis ticks.
curveType'linear' | 'natural' | 'monotone' | 'step''linear'Chart curve type.
hideLegendbooleantrueHide the chart legend.

AI Context

component: XACardRevenue
package: "@xenterprises/nuxt-x-app"
use-when: Showing a revenue or sales metric alongside a compact area sparkline, typically on a dashboard overview. Requires a data array and a categories map keyed by data field name.
Copyright © 2026