From: Nathaniel G. A. <nat...@ya...> - 2003-06-04 18:52:02
|
wow, look at that. For some reason the code in org.jCharts.axisChart.axis.YAxis got commented out and other code inserted in its place. If you look at line 243 in YAxis you will see: /* if( i < super.getAxisLabelsGroup().size() || ( i == super.getAxisLabelsGroup().size() && !axisTypeProperties.getShowEndBorder() ) ) */ if( i == super.getNumberOfScaleItems() - 1 && !axisTypeProperties.getShowEndBorder() ) { axisTypeProperties.getGridLineChartStroke().draw( graphics2D, line2D ); } else { //---draw top border with the same ChartStroke as the X-Axis axisProperties.getXAxisProperties().getAxisStroke().draw( graphics2D, line2D ); } change the if so it is the commented out if statement. if( i < super.getAxisLabelsGroup().size() || ( i == super.getAxisLabelsGroup().size() && !axisTypeProperties.getShowEndBorder() ) ) { axisTypeProperties.getGridLineChartStroke().draw( graphics2D, line2D ); } else { //---draw top border with the same ChartStroke as the X-Axis axisProperties.getXAxisProperties().getAxisStroke().draw( graphics2D, line2D ); } this will work for you. remember to set the: axisProperties.getYAxisProperties().setShowEndBorder( false ); so your red grid lines are not drawn over the end of the axis. Can you do a build locally or would you like a build from the site? I guess we should do a build as this is a hairy bug. --- "Buchanan, Paul" <Pau...@th...> wrote: > Contrary to the documentation, I do not seem to get "default" horizontal > grid lines on line graphs. If I turn them on explicitly: > > AxisProperties axisProperties = new AxisProperties(); > axisProperties.getYAxisProperties().setShowGridLines( > AxisTypeProperties.GRID_LINES_ALL ); > > I do get grid lines. However, I cannot change their properties. Code such > as: > > ChartStroke yAxisGridLines = new ChartStroke(new BasicStroke(1.0f), > Color.red); > axisProperties.getYAxisProperties().setGridLineChartStroke( yAxisGridLines > ); > > has no effect. Interestingly, I can enable grid lines on the x axis, and > change their properties as expected. I have been working with the Line > graph example in a simple application that is outputting the resulting graph > with the JPEGEncoder13. > > Any ideas? > > Thanks > > Paul Buchanan > email: pau...@th... > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > _______________________________________________ > jCharts-users mailing list > jCh...@li... > https://lists.sourceforge.net/lists/listinfo/jcharts-users ===== http://nathaniel-auvil.blog-city.com/ __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com |