import { ChartType as ChartType$1, ChartOptions as ChartOptions$1, Plugin } from 'chart.js'; export { ChartData } from 'chart.js'; import { PassThrough, PassThroughOption } from 'primeng/api'; /** * Defines the type of chart. * @group Types */ 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 */ interface ChartOptionsBase extends ChartOptions$1 { } /** * Chart configuration options. `ChartOptions<'bar'>` resolves to the chart.js type. * @group Types */ type ChartOptions = [TType] extends [never] ? ChartOptionsBase : ChartOptions$1; /** * Per-chart plugin. Options default to `Record` rather than chart.js' * unexported `AnyObject`. * @group Types */ type ChartPlugin> = Plugin; /** * Event emitted when chart data is selected. * @group Events */ 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 */ 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. */ type ChartPassThrough = PassThrough>; export type { ChartDataSelectEvent, ChartOptions, ChartOptionsBase, ChartPassThrough, ChartPassThroughOptions, ChartPlugin, ChartType };