Update src/components/histogram/histogram.tsx

Co-authored-by: Hannah Park <70654324+hannahcode@users.noreply.github.com>
This commit is contained in:
James Sturgis 2022-01-20 17:23:51 +01:00 committed by GitHub
parent e1bde966bc
commit 397b232ba1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ export const Histogram = ({ data }: Props) => {
const min = 10 const min = 10
const max = Math.ceil(Math.max.apply(null, data)*1.2) const max = Math.ceil(Math.max.apply(null, data)*1.2)
return( return(
<div className="columns-1 justify-left m-2 bg-blue-300 text-sm"> <div className="columns-1 justify-left m-2 text-sm">
{ data.map(( value, i ) => ( { data.map(( value, i ) => (
<Progress index={i} size={min+100*value/max} label={String(value)} /> <Progress index={i} size={min+100*value/max} label={String(value)} />
)) ))