IFFDAYIFFDAYDesign
Film and community

RatingHistogram

Ratings in ten half-star bins, with the mean and the count.

import { RatingHistogram } from '@iffday/web/src/kit';

Example

Ten bars run from half a star to five stars. The tallest fills 46px and the rest follow the counts; any bin with a rating keeps at least 6% height, so it never reads as zero. Hovering a bar shows 4 stars, 62 people. The mean and the count sit at the top.

Rating

4.1214 people

Usage

distribution has exactly ten numbers, the first for half a star. For an entry’s complete rating section use ScoreSummary.

Props

Ten half-star bins from ½ to 5 stars.

PropTypeDefault
distribution*number[]
mean*number | null
count*number