(userOptions: ChartGPUOptions = {})
| 999 | * @returns Resolved options with slider bottom-space applied if needed |
| 1000 | */ |
| 1001 | export function resolveOptionsForChart(userOptions: ChartGPUOptions = {}): ResolvedChartGPUOptions { |
| 1002 | const base: ResolvedChartGPUOptions = { ...resolveOptions(userOptions), tooltip: userOptions.tooltip }; |
| 1003 | if (!hasSliderDataZoom(userOptions)) return base; |
| 1004 | return { |
| 1005 | ...base, |
| 1006 | grid: { |
| 1007 | ...base.grid, |
| 1008 | bottom: base.grid.bottom + DATA_ZOOM_SLIDER_RESERVE_CSS_PX, |
| 1009 | }, |
| 1010 | }; |
| 1011 | } |
| 1012 | |
| 1013 | export const OptionResolver = { resolve: resolveOptions } as const; |
| 1014 |
no test coverage detected