UNPKG

@ebay/ebayui-core

Version:

Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.

92 lines (91 loc) 3.15 kB
import type { WithNormalizedProps } from "../../global"; import type HighchartsTypes from "highcharts"; declare const Highcharts: typeof HighchartsTypes; interface AreaChartInput extends Omit<Marko.HTML.Div, `on${string}`> { title?: Highcharts.TitleOptions["text"]; description?: Highcharts.SeriesAccessibilityOptionsObject["description"]; series: Highcharts.SeriesAreasplineOptions | Highcharts.SeriesAreasplineOptions[]; tooltipValueFormatter?: (value: string | number) => string; tooltipTitleFormatter?: (value: string | number, dateFormat: typeof Highcharts.dateFormat) => string; xLabelFormatter?: (value: string | number, dateFormat: typeof Highcharts.dateFormat) => string; yLabelFormatter?: (value: string | number) => string; areaType?: "areaspline" | "area"; highchartOptions?: Highcharts.Options; "cdn-highcharts"?: string; "cdn-highcharts-accessibility"?: string; "cdn-highcharts-pattern-fill"?: string; version?: string; "on-load-error"?: (err: Error) => void; } export interface Input extends WithNormalizedProps<AreaChartInput> { } declare class AreaChart extends Marko.Component<Input> { chartRef: Highcharts.Chart; onInput(): void; onMount(): void; handleError(err: Error): void; handleSuccess(): void; getContainerId(): string; /** * Initialize the highchart extensions */ _initializeHighchartExtensions(): void; /** * Set up the chart with the input data and configuration options. */ _setupCharts(): void; /** * Default format function for the tooltip titles */ _tooltipTitleFormatter(value: number | string, dateFormat: typeof Highcharts.dateFormat): string; /** * Default format function for the tooltip values */ _tooltipValueFormatter(value: number | string): string; /** * Default format function for the yAxis labels */ _yLabelFormatter(value: number | string): string; /** * Merge the source Highcharts config into the target Highcharts config * * Allows for custom overrides of ebay default Highcharts configuration settings */ _mergeConfigs(source: { [key: string]: any; }, target: { [key: string]: any; }): { [key: string]: any; }; /** * Get the title configuration for the chart */ getTitleConfig(): Highcharts.TitleOptions; /** * Get the chart configuration for the chart */ getChartConfig(): Highcharts.ChartOptions; /** * Get the xAxis configuration for the chart */ getXAxisConfig(): Highcharts.XAxisOptions; /** * Get the yAxis configuration for the chart */ getYAxisConfig(): Highcharts.YAxisOptions; /** * Get the legend configuration for the chart */ getLegendConfig(): Highcharts.LegendOptions; /** * Get the tooltip configuration for the chart */ getTooltipConfig(): Highcharts.TooltipOptions; /** * Get the plot options configuration for the chart */ getPlotOptions(): Highcharts.PlotOptions; onDestroy(): void; } export default AreaChart;