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); 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.