import React, { FC } from 'react'; import { UncontrolledTooltip } from 'reactstrap'; import { Histogram } from '../../types/types'; import { bucketRangeString } from './DataTable'; const HistogramChart: FC<{ histogram: Histogram; index: number }> = ({ index, histogram }) => { const { buckets } = histogram; const rangeMax = buckets ? parseFloat(buckets[buckets.length - 1][2]) : 0; const countMax = buckets ? buckets.map((b) => parseFloat(b[3])).reduce((a, b) => Math.max(a, b)) : 0; const formatter = Intl.NumberFormat('en', { notation: 'compact' }); return (