Skip to main content

chart.zoomToObjects()

Type: function(labels)
Returns: Promise<void>

Zooms to the specified objects labels, adjusting zoom level and viewport position.

Labels are case sensitive.

chart.zoomToObjects(['A-1-10']);
  • If a label doesn't match any object, the returned promise is rejected.
  • On multi-floor charts, it changes floors when the objects aren't shown, so you don't need to call goToFloor() first.
  • If the objects are on more than one floor, it shows all of those floors.
  • In 2D, that's the all-floors view, without zooming in on the objects.
  • With lockActiveFloor, it stays on the locked floor and leaves out the objects on other floors, listing them in a console warning.