Filter Sections mode
Configuration setting
mode: 'filterSections'
Description
Allows to change the currently filtered section programmatically or by interacting with them directly. Making a section filtered automatically zooms the chart to fit them in the viewport.
If there is more than one section with the same label, all of them will be filtered on screen.
The filtered section can be cleared by either zooming out completely or by calling chart.clearFilteredSection()
.
Configuration
Takes all of the Event Manager configuration options, styling and callbacks.
Additional methods for this mode
chart.setFilteredSection
chart.setFilteredSection(label: string)
Sets the filtered section. Will raise an error if the section cannot be found, or it is found on multiple floors while the chart does not have a floor selected.
chart.clearFilteredSection
chart.clearFilteredSection()
Clears the filtered section. This will also reset the zoom level back to its initial state.
Additional callbacks for this mode
onFilteredSectionChange
{
onFilteredSectionChange: (sections: Array) => {}
}
Called when the filtered section changes, either by user interaction or programmatically.
The first argument contains an array of the matched sections, which will typically be only one unless there are multiple sections with the same label. This array will be empty if the filtered sections have been cleared.