Skip to content

Extras

ResourceTimeline

Bit.BlazorUI.ExtrasResourceSchedulerGanttResourcePlanner

BitResourceTimeline is a high-performance resource timeline - a planner or scheduler with the time along the horizontal axis, the resources down the vertical one and the allocations drawn as bars in between, for gate and fleet planning, crew rosters, machine schedules and the like. One engine lays the board out and drives it while a canvas, SVG or HTML renderer paints it, so tens of thousands of bars stay fluid. It zooms from weeks down to minutes, selects and navigates with the pointer and the keyboard, edits (move, resize, create, copy, paste and delete) under the app's control, nests resources into collapsible groups, draws its axes in any time zone and locale, streams large data sets or loads them window by window on demand, and takes templates for its resource column, its tooltips and its corner.

Navigation & editing

Panning and zooming from code, selection and pointer events, moving, resizing and creating bars under the app's control, and how overlapping bars stack.

Navigation & zoom

A reference to the timeline drives its view. PanByDaysAsync moves it by whole days without changing the zoom - 24 hours a step, or to a local midnight with PanToDayStart - and GoToTodayAsync centers the current time, which AutoScrollToNow does as the first load lands. ZoomInAsync, ZoomOutAsync, ZoomToDaysAsync (that many days fill the view) and SetPixelsPerHourAsync zoom around the center within MinPixelsPerHour and MaxPixelsPerHour, ResetZoomAsync returns to PixelsPerHour (one day in view while it is not set), and ScrollToTimeAsync centers any time. OnViewChanged reports the visible range and the scale, at most once a frame. Ctrl + wheel, a pinch, PageUp / PageDown and Ctrl + plus / minus / 0 do the same from the input devices.



Scroll or zoom the timeline

Selection & pointer events

A click selects a bar, Ctrl / Cmd + click toggles one, Shift + click selects a range and a drag on empty content draws a marquee; from the keyboard the arrows move between the bars, Enter selects and Escape clears. OnSelectionChanged reports the selected bars - the very instances of the Config - when the set changes, and SelectAsync, ClearSelectionAsync and GetSelectedBarsAsync drive it from code, with ScrollToAllocationAsync and ScrollToResourceAsync bringing a bar or a row into view. OnClick, OnDoubleClick and OnContextMenu (a right-click, the browser's menu suppressed) say what was under the pointer - the area, the resource, the time and the bar - with the coordinates to place a menu of your own at.


Selected: nothing
Click:
Double-click:
Right-click:

Editing

With Editable a bar is dragged to move it in time - and onto another row unless AllowResourceChange is off - or by an edge to resize it, snapped to EditSnapMinutes; Alt + arrows do the same from the keyboard, and a drag of one of several selected bars moves them all. Before a change is committed OnAllocationChanging (one bar) and OnAllocationsChanging (several) can refuse it - here, any flight that would start in the past - and the bars snap back without a reload; OnAllocationChanged then reports each accepted change on the very instance of the Config. With EmptyDragAction set to Create a drag on empty content draws a new bar that OnAllocationCreating builds, Ctrl / Cmd + C and V copy and paste through OnAllocationsCopying, and with AllowDelete Delete / Backspace removes the selection once OnAllocationsDeleting agrees - the timeline never invents ids. Locked bars, the flights at their gates right now, can be selected but not moved, resized or (here) deleted.


Overlap & stacking

Bars overlapping in time on one row are stacked into lanes BarMargin pixels apart, and the row grows to hold them (ResourceHeight is its minimum, BarHeight the thickness of a bar). StackLabelClearance widens the gap by the room the labels and icons of the bars need (Gate A3), and StackOnLabelCollision also stacks bars whose labels would collide though their times do not (Gate A2); both are on by default. CollapseMatchingEdgeLabels draws the airport two legs meet at once, between them, instead of stacking them for it (Gate A5). MaxStackLanes caps a stack: the bars beyond it hide behind a +N marker that lists them on hover and selects them on click. While editing, turning AllowOverlap off refuses a move or a resize that would overlap another unlocked bar of its row - drag a bar onto the one of Gate A4.

MaxStackLanes


Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.