DistributionToChartData

Function: distributionToChartData()

[object Object]

Defined in: routes/admin/statistics/statistics.handlers.tsx:235

Converts the distribution of attended activities into chart data: one column per number of activities from 1 up to the highest number, with missing numbers as 0 so the shape has no gaps. When that would be more than MAX_DISTRIBUTION_COLUMNS columns, consecutive numbers are grouped into ranges of equal width (e.g. "1-3", "4-6"), so one very active member doesn't make the chart extremely long.

Parameters

distribution

ActivityCountDto[] | null | undefined

Members per number of attended activities.

Returns

ChartDatum[]

The chart data, ascending by number of activities.

On this page