import React from 'react'; import { Intergalactic } from 'intergalactic/core'; import { Flex } from 'intergalactic/flex-box'; import { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale'; import { BaseChartProps } from './AbstractChart.type'; type BarKey = string; export type CompactHorizontalBarChartData = Array>; export type CompactHorizontalBarChartProps = BaseChartProps & { x: string; y: string; xScale?: ScaleBand | ScaleTime; yScale?: ScaleLinear; /** Handle click by `HoverRect`. `index` is an index of the data array. */ onClickHoverRect?: (index: number, e: React.SyntheticEvent) => void; /** Handle click by Bar. */ onClickBar?: (barItem: number, e: React.SyntheticEvent) => void; }; export type CompactHorizontalBarChartType = Intergalactic.Component; export {};