Skip to content

Interface: BaseChartProps

chartType: ChartType

Chart type


optional className?: string

Additional CSS classes


optional colorPalette?: ChartColorPalette

Color palette to use. Auto-selected based on chart type if not specified.

  • “categorical”: Distinct colors for different categories (bar, pie, line)
  • “sequential”: Gradient for magnitude (heatmap)
  • “diverging”: Two-tone for positive/negative (correlation)

optional colors?: string[]

Custom colors (overrides colorPalette)


data: ChartData

Chart data (Arrow Table or JSON array) - format is auto-detected


optional height?: number

Chart height in pixels

300

optional innerRadius?: number

Inner radius for pie/donut (0-100)

0

optional labelPosition?: "center" | "outside" | "inside"

Label position for pie/donut

"outside"

optional max?: number

Max value for heatmap color scale


optional min?: number

Min value for heatmap color scale


optional onDataClick?: (datum) => void

Fired when a data element (bar, slice, point) is clicked. Fire-and-forget: the return value is ignored (async handlers are fine — the chart never awaits). The handler receives a normalized ChartClickDatum.

Pointer-only: charts render to , so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action.

ChartClickDatum

void


optional options?: Record<string, unknown>

Additional ECharts options to merge.

Only the built-in feature set is registered by this package, so options referencing extra ECharts features (dataZoom, toolbox, markLine, markArea, graphic, dataset, top-level axisPointer, …) require registering them in your app via import { use } from "echarts/core". This only works when your echarts resolves to the same module instance/version as this package’s (the registry is a singleton; duplicate echarts copies won’t share registrations).


optional orientation?: Orientation

Chart orientation

"vertical"

optional selected?: string | string[]

Controlled selection by category name. See ChartBaseProps.selected.


optional showArea?: boolean

Show area fill for radar charts

true

optional showLabels?: boolean

Show labels on pie/donut slices

true

optional showLegend?: boolean

Show legend

true

optional showSymbol?: boolean

Show data point symbols (line/area charts)

false

optional smooth?: boolean

Smooth line curves (line/area charts)

true

optional stacked?: boolean

Stack series

false

optional symbolSize?: number

Symbol size for scatter charts

8

optional title?: string

Chart title


optional valueFormatter?: ChartValueFormatter

Formats measure values. See ChartBaseProps.valueFormatter.


optional xKey?: string

X-axis field key (auto-detected from schema if not provided)


optional yAxisKey?: string

Y-axis field key for heatmap (the row dimension)


optional yKey?: string | string[]

Y-axis field key(s) (auto-detected from schema if not provided)