import { ChartData, ChartOptions as ChartOptions$1, ChartType as ChartType$1, Plugin } from "chart.js"; import { PassThrough, PassThroughOption } from "primeng/api"; /** * Defines the type of chart. * @group Types */ export type ChartType = 'bar' | 'line' | 'scatter' | 'bubble' | 'pie' | 'doughnut' | 'polarArea' | 'radar'; /** * Untyped chart options. An interface over chart.js' own `ChartOptions`, so the * bundled d.ts references it by name instead of expanding the internal * `_DeepPartialObject`, which chart.js does not export. * Prefer {@link ChartOptions}. * @group Types */ export interface ChartOptionsBase extends ChartOptions$1 {} /** * Chart configuration options. `ChartOptions<'bar'>` resolves to the chart.js type. * @group Types */ export type ChartOptions = [TType] extends [never] ? ChartOptionsBase : ChartOptions$1; /** * Per-chart plugin. Options default to `Record` rather than chart.js' * unexported `AnyObject`. * @group Types */ export type ChartPlugin> = Plugin; /** * Event emitted when chart data is selected. * @group Events */ export interface ChartDataSelectEvent { /** * Browser event. */ originalEvent: Event; /** * Selected element. */ element: unknown; /** * Selected dataset. */ dataset: unknown[]; } /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link UIChart.pt} * @group Interface */ export interface ChartPassThroughOptions { /** * Used to pass attributes to the host's DOM element. */ host?: PassThroughOption; /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the canvas DOM element. */ canvas?: PassThroughOption; } /** * Defines valid pass-through options in Chart. * @see {@link ChartPassThroughOptions} * * @template I Type of instance. */ export type ChartPassThrough = PassThrough>; export type { ChartData };