X Enterprises
Card

CardChart

Generic area-chart card with a subtitle, comparison row, and optional legend.

CardChart

Generic area-chart card with a subtitle, comparison row, and optional legend for embedding area-chart visualizations inside a card.

Component

<XACardChart />

Generic area-chart card with a subtitle, comparison row, and optional legend.

<XACardChart
  name="Page Views"
  :value="84200"
  :chart-data="pageViewData"
  :categories="{ views: { name: 'Views', color: '#6366f1' } }"
  comparison-label="vs last month"
  comparison-value="+9.4%"
  :show-legend="false"
/>

Props

PropTypeDefaultDescription
namestringRequired. Card name/subtitle.
valuestring | numberRequired. Summary metric value.
chartDataChartDataItem[]Required. Area chart data ({ date, ...values }).
categoriesRecord<string, { name: string; color: string }>Required. Chart categories.
heightnumber90Chart height in px.
showLegendbooleanfalseShow the chart legend.
curveTypeanyCurveType.LinearCurve interpolation type.

AI Context

component: XACardChart
package: "@xenterprises/nuxt-x-app"
use-when: Embedding a generic area chart inside a card with a summary metric and comparison row. chartData must be ChartDataItem[] with a date field and one field per category key.
Copyright © 2026