Search code examples
javascriptchartsshieldui

Zooming In/Out a Shield UI Chart graph


I am wondering how scrolling for Shield UI Chart works? There is zoomMode, but how does one enable it?


Solution

  • By default zooming for Shield UI Chart works is disabled. Enabling it is done by actually setting the zoomMode property. In other words- no additional enabling is necessary, once the mode has been specified. This can be done by choosing one of the 3 available modes: 'x', 'y', and 'xy'. You can try this- zoomMode: 'xy',- it makes the chart zoom in both by the X and Y axis.

    It is worth noticing, that instead of the mouse button, the mouse wheel is used to zoom in and out.