React to Resize Events
This applies to: Visual Data Discovery
When a user resizes a chart widget, you must account for the new widget dimensions. You can specify your own resize handler function by overriding the controller.resize
method.
Example:
controller.resize = function(newWidth, newHeight) { // If needed, use the newWidth and newHeight values to re-size chart }
The specified handler executes every time a user action causes the widget dimensions to change. The following list provides a few examples of actions that trigger the resize event:
- A user changes the dimensions of the browser window.
- A user changes the dimensions of an individual widget.
Hiding or displaying controls like the Time Bar may reduce or increase the space available for widgets in a dashboard.