Resource Footers & Revenue Sidebar
The resources can be rendered vertically either as plain text or based on a custom grid template. This example utilizes the properties of the resource objects, which are conference rooms with capacities and pricing. Along with the resource template defined using renderResource , an additional sidebar is rendered on the opposite side of the row using renderSidebar , displaying the calculated revenue.
Both the resource and sidebar columns have customizable headers and footers, which are set using the renderResourceHeader, renderResourceFooter, renderSidebarHeader, renderSidebarFooter functions.
The occupancy percentages that can be seen for each day are set through the renderDayFooter in a similar way to the day header templates.
The headers are equipped with sorting functionality, allowing data to be sorted on click. Event listeners are attached to the resource, day, and sidebar headers, making them clickable. Each header has a custom icon indicating the current sorting state (ascending, descending, or unordered). Clicking a header cycles through these sorting states, with the corresponding icon reflecting the current state. The initial order in which the resources appear follows the order of the array passed to the component.
The resources column has a default width that may not be sufficient to fit its content. This can be adjusted by overriding it with a CSS rule:
.md-resource-details .mbsc-timeline-resource-col {
width: 280px;
} Demo
The live demo didn't load.
Try it on demo.mobiscroll.com