Constructor
new ZoomPane(name, options)
Create a zoom pane.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | A name for the pane. |
options |
Object | Configuration options. |
Methods
activate()
Activate this pane, allowing it to accept pointer events.
addTimeDivider(time)
Add a divider at the specified time.
Parameters:
| Name | Type | Description |
|---|---|---|
time |
number | The time. |
clearZoom()
Clear the zoom, setting the zoom brush back to its default.
deactivate()
Deactivate this pane, preventing it from accepting pointer events.
decreaseZoom()
Decrease the zoom. This actually increases the size of the zoom brush.
draw()
Draw this ZoomPane with any time dividers. By default, a zoom brush is created that covers the entire pane.
Changing the size of the zoom brush triggers a call to the onZoom() callback with the the zoom brush starting
x and ending x values as parameters.
drawPanel()
Draw the panel for this pane.
drawTimeDividers()
Draw time dividers.
erasePanel()
Erase the panel for this pane.
eraseTimeDividers()
Erase time dividers.
increaseZoom()
Increase the zoom. This actually decreases the size of the zoom brush.
initialize(parentElement, width, height, timeScale)
Initialize this ZoomPane.
Parameters:
| Name | Type | Description |
|---|---|---|
parentElement |
Element | The parent element. |
width |
number | The parent width. |
height |
number | The parent height. |
timeScale |
d3.scaleLinear | The time scale. |
initializePanel(panelElement)
Initialize the panel for this pane, setting its parent element to the specified element.
Parameters:
| Name | Type | Description |
|---|---|---|
panelElement |
element | The parent element. |
lower()
Lower this pane to the bottom of the list of panes in its containing TimeFrame.
moveZoomBrush(startTime, endTime)
Move the zoom brush to the specified time range.
Parameters:
| Name | Type | Description |
|---|---|---|
startTime |
number | The start time. |
endTime |
number | The end time. |
raise()
Raise this pane to the top of the list of panes in its containing TimeFrame.
setZoom(x1, x2)
Set the zoom brush to the specified x range.
Parameters:
| Name | Type | Description |
|---|---|---|
x1 |
number | Start x. |
x2 |
number | End x. |