List of usage examples for org.jfree.chart.plot CategoryPlot setRangeAxis
public void setRangeAxis(int index, ValueAxis axis, boolean notify)
From source file:ChartUsingJava.CombinedCategoryPlot.java
/** * Sets the range axis that is shared by all the subplots. * * @param axis the axis.// ww w. j a v a 2 s . c o m */ public void setRangeAxis(ValueAxis axis) { Iterator l_itr = getSubplots().iterator(); while (l_itr.hasNext()) { CategoryPlot l_subplot = (CategoryPlot) l_itr.next(); l_subplot.setRangeAxis(0, axis, false); } super.setRangeAxis(axis); if (null == axis) { return; } axis.configure(); }
From source file:ChartUsingJava.CombinedCategoryPlot.java
/** * Adds a new subplot with the specified weight. * * @param subplot the subplot./*w w w .j a va2 s . co m*/ * @param weight the weight for the subplot. */ public void add(CategoryPlot subplot, int weight) { super.add(subplot, weight); ValueAxis l_range = super.getRangeAxis(); subplot.setRangeAxis(0, l_range, false); super.setRangeAxis(l_range); if (null == l_range) { return; } l_range.configure(); }