On small screens, the Y axis stays fixed while scrolling horizontally

On small screens, the Y axis stays fixed while scrolling horizontally

By Torstein Hønsi

Twitter: @TorsteinHonsi

Highcharts already has support for zooming and panning, but sometimes you just want to show all the data and leverage the mobile phone's smooth, built-in scrolling. In that case, making the Y axis stay fixed makes it easier for the user to read the data.

In the snippet, we pull out the axis SVG elements and move them to a separate container that is positioned absolutely.

Do you like this example? Rate it!

Do you have some code you want to share with the world as well? Go here to learn how you may contribute some helpful code of your own.