1

When enabling scrolling and/or scaling, the data on the graph overlaps the y-axes of the graph. The y-axis labels can be covered and the data can spill out the right hand side too. Is there a method to fix this?

Code:

// min and max are the first and last X-values of the data
graph.getViewport().setXAxisBoundsManual(true);
graph.getViewport().setMinX(min);
graph.getViewport().setMaxX(max);
graph.getViewport().setScalable(true);
graph.getGridLabelRenderer().setNumHorizontalLabels(3); 
graph.getGridLabelRenderer().setHumanRounding(false);

enter image description here

Edit: This phenomenon also happens when enabling scaling in the Y axis, only it overlaps the X-axis instead.

McGuile
  • 818
  • 1
  • 11
  • 29

0 Answers0