i need the following type of chart:
It should be a "steped" line chart with categories on the vertical axis, like this:
I found this example of an Category Step Chart, but it the orientation is not right for my purpose.
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/renderer/category/CategoryStepRenderer.html
All i have done so far is this, but as you can see the red line does not fit to the orientation of the chart(should be horizontal):
The corresponding code to this:
DefaultCategoryDataset ds = new DefaultCategoryDataset();
// create dataset
for (int k = 0; k < ffCount; k++) {
StateSignal ss1 = (StateSignal) this.ffDSet.getFframes().get(k).getSignals().get(i);
ds.setValue((double) k + 1, ss1.getName(), ss1.getStates().get(0).getStatus());
}
CategoryStepRenderer categorysteprenderer = new CategoryStepRenderer(false);
categorysteprenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
CategoryAxis categoryaxis = new CategoryAxis("Category");
NumberAxis numberaxis = new NumberAxis("Value");
CategoryPlot categoryplot = new CategoryPlot(ds, categoryaxis, numberaxis, categorysteprenderer);
categoryplot.setRangePannable(true);
categoryplot.setOrientation(PlotOrientation.HORIZONTAL);
chart = new JFreeChart("test", null, categoryplot, true);
I don´t get it to work. Any ideas?
Thanks in advance!