When using an XYBarRenderer and a LogarithmicAxis on
the range, the bars are not drawn. Instead, their
outline is drawn at the Y-value and nothing extends to
the baseline.
Example:
import java.util.Date;
import javax.swing.JFrame;
import org.jfree.chart.ChartFrame;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.DateAxis;
import org.jfree.chart.axis.LogarithmicAxis;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.xy.XYBarRenderer;
import org.jfree.data.time.Second;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;
public class Test
{
public static void main(String[] args)
{
TimeSeries series = new TimeSeries("series",
Second.class);
for(int i = 0; i < 100; i++)
// Add a value between 1 and 10^10 every second
series.add(new Second(new Date(i * 1000)),
Math.pow(10, Math.random() * 10));
TimeSeriesCollection dataset = new
TimeSeriesCollection(series);
XYPlot plot = new XYPlot(dataset, new DateAxis(), new
LogarithmicAxis(""), new XYBarRenderer());
JFreeChart chart = new JFreeChart(plot);
ChartFrame frame = new ChartFrame("", chart);
frame.pack();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
Logged In: YES
user_id=1606022
Originator: NO
Should have been fixed by patch 1671126.
https://sourceforge.net/tracker/index.php?func=detail&aid=1671126&group_id=15494&atid=315494
Logged In: YES
user_id=112975
Originator: NO
I've committed Sergei's patch to CVS for inclusion in the 1.0.5 release. Your sample test works correctly for me, after applying the patch.