#689 XYBarRenderer does not render bars on LogarithmicAxis

1.0.x
closed-fixed
General (896)
5
2007-03-05
2006-11-10
Anonymous
No

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);
}

}

Discussion

  • David Gilbert

    David Gilbert - 2007-03-05
    • assigned_to: nobody --> mungady
    • status: open --> closed-fixed
     
  • David Gilbert

    David Gilbert - 2007-03-05

    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.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks