private void previewY() {
   Viewport tempViewport = new Viewport(recordChart.getMaximumViewport());
   float dy = (tempViewport.height() + 0.2f) / 4;
   tempViewport.inset(0, dy);
   recordPreviewChart.setCurrentViewportWithAnimation(tempViewport);
   recordPreviewChart.setZoomType(ZoomType.VERTICAL);
 }
 private void previewXY() {
   // Better to not modify viewport of any recordChart directly so create a copy.
   Viewport tempViewport = new Viewport(recordChart.getMaximumViewport());
   // Make temp viewport smaller.
   float dx = tempViewport.width() / 4;
   float dy = tempViewport.height() / 4;
   tempViewport.inset(dx, dy);
   recordPreviewChart.setCurrentViewportWithAnimation(tempViewport);
 }