UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

38 lines 1.25 kB
import { RefObject } from 'react'; import { XDomain, XScaleType, YDomain, YScaleType } from '../../internal/components/cartesian-chart/interfaces'; import { AreaChartProps } from '../interfaces'; import { ChartModel } from './index'; export interface UseChartModelProps<T extends AreaChartProps.DataTypes> { isRtl?: boolean; fitHeight?: boolean; externalSeries: readonly AreaChartProps.Series<T>[]; visibleSeries: readonly AreaChartProps.Series<T>[]; setVisibleSeries: (series: readonly AreaChartProps.Series<T>[]) => void; highlightedSeries: null | AreaChartProps.Series<T>; setHighlightedSeries: (series: null | AreaChartProps.Series<T>) => void; xDomain?: XDomain<T>; yDomain?: YDomain; xScaleType: XScaleType; yScaleType: YScaleType; height: number; width: number; popoverRef: RefObject<HTMLElement>; statusType: 'loading' | 'finished' | 'error'; } export default function useChartModel<T extends AreaChartProps.DataTypes>({ isRtl, fitHeight, externalSeries: allSeries, visibleSeries: series, setVisibleSeries, highlightedSeries, setHighlightedSeries, xDomain, yDomain, xScaleType, yScaleType, height: explicitHeight, width, popoverRef, statusType }: UseChartModelProps<T>): ChartModel<T>;