Component guideEditable source

Work allocation

Inspect planned hours and shares without losing the whole.

On this page4 sectionsBack to top

Compare the current and next sample planning periods. Select a workstream to inspect its hours and share, while the donut and the table retain all four workstreams. The values are planned hours, not time-tracking records.

Live preview
Loading preview...

#Installation

Complete the base setup. The recipe installs Chart and Card and keeps the application's selected theme.

npx shadcn@latest add https://neobrutal-ui.andongmin.com/r/chart-work-allocation.json

#Usage

import ChartWorkAllocation from "@/components/ui/chart-work-allocation";

export default function AllocationReport() {
  return <ChartWorkAllocation />;
}

#API reference

This source-editable recipe requires no props.

Source / controlPurpose
periodsFour nonnegative hour values per sample planning period.
workstreamsThe corresponding ordered category names.
configNames and shared-theme colors.
Allocation periodSwitches all values and the denominator together.
Inspect workstreamChanges the readout, not the total population.
View allocation dataHours and shares for all categories, including the selected one.

Keep category order aligned with the data arrays. Handle zero totals or empty data before computing shares when integrating live data. Rounded shares may not sum to exactly 100%.

#Accessibility

The workstream inspector uses a labeled Base UI Select with keyboard support. A textual readout, category order caption, and exact table provide a color-independent reading path. The selected row includes an accessible selected marker. The chart is labeled and animations are disabled.