X Enterprises
Chart

ChartBubble

Bubble chart with x/y/size accessors and domain-line control.

ChartBubble

Bubble (scatter) chart where circle size encodes a third variable. X, Y, and size values are resolved via accessor functions rather than derived from category keys. Forwards unknown attributes to the underlying primitive via v-bind="$attrs".

Components

<XAChartBubble />

Bubble (scatter) chart where circle size encodes a third variable. X, Y, and size are resolved via accessor functions.

<XAChartBubble
  :data="campaignData"
  :categories="{ campaign: { name: 'Campaign', color: '#6366f1' } }"
  category-key="type"
  :x-accessor="(d) => d.reach"
  :y-accessor="(d) => d.conversions"
  :size-accessor="(d) => d.budget"
  x-label="Reach"
  y-label="Conversions"
  :size-range="[5, 30]"
/>

Props

PropTypeDefaultDescription
dataany[]Required. Chart data array.
categoriesRecord<string, { name: string; color: string }>Required. Series definitions.
categoryKeystringRequired. Data field used to map points to a category.
heightnumber300Chart height in px.
xAccessor(d: any) => numberExtracts the X value from a data point.
yAccessor(d: any) => numberExtracts the Y value from a data point.
sizeAccessor(d: any) => numberExtracts the bubble size value from a data point.
xLabelstringX-axis label.
yLabelstringY-axis label.
xFormatter(tick: number, i?: number) => stringCustom X-axis tick formatter.
yFormatter(tick: number, i?: number) => stringCustom Y-axis tick formatter.
legendPositionLegendPositionLegendPosition.BottomRightLegend placement.
hideLegendbooleanfalseHide the legend.
hideTooltipbooleanfalseHide the hover tooltip.
sizeRange[number, number][5, 25]Min and max bubble radius in px.
opacitynumberBubble fill opacity.
xNumTicksnumberX-axis tick count.
yNumTicksnumberY-axis tick count.
xGridLinebooleanfalseShow vertical grid lines.
yGridLinebooleantrueShow horizontal grid lines.
hideXAxisbooleanfalseHide the X axis.
hideYAxisbooleanfalseHide the Y axis.
xDomainLinebooleanfalseShow the X domain line.
yDomainLinebooleanfalseShow the Y domain line.

AI Context

component: XAChartBubble
package: "@xenterprises/nuxt-x-app"
auto-import: true
prefix: XA
use-when: Visualizing three-variable relationships (x position, y position, and bubble size) — e.g., campaign reach vs conversions vs budget
patterns:
  - categoryKey maps each data point to a category color via the categories record.
  - xAccessor, yAccessor, and sizeAccessor are functions that extract numeric values from each data point.
Copyright © 2026