mcstoufer Posted January 31, 2008 Report Share Posted January 31, 2008 Is this possible with Java? I tried all the setGridlines() and setGrid() format calls on the x-axis Axis object and still no lines appear. Do I have to fake it and add ConstantLines at each major tick mark on the x-axis? rangeBar.setGrid(ChartGrid.VERT); Axis axisX = rangeBar.getAxisX(); axisX.setStep((short) 20); axisX.setGridlines(true); axisX.getGrid().setColor(new java.awt.Color(215,215,215)); axisX.getGrid().setStyle(LineStyle.DASH); axisX.getLabelsFormat().setDecimals((short)0); axisX.getLabelsFormat().setFormat(AxisFormat.NUMBER); Quote Link to comment Share on other sites More sharing options...
mcstoufer Posted January 31, 2008 Author Report Share Posted January 31, 2008 Problem solved. I re-read the API docs and saw I had to switch the X & Y axis methods. Therefore, the example above would reference 'getAxisY()' and all the axisX be renamed to axisY. It draws nicely now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.