private BarRenderer createBarChartRenderer(NumberFormat numberFormat) { BarRenderer renderer = new BarRenderer(); ItemLabelPosition positiveItemLabelPosition = new ItemLabelPosition( ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER); renderer.setBasePositiveItemLabelPosition(positiveItemLabelPosition); ItemLabelPosition negativeItemLabelPosition = new ItemLabelPosition( ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER); renderer.setBaseNegativeItemLabelPosition(negativeItemLabelPosition); renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator( StandardCategoryItemLabelGenerator.DEFAULT_LABEL_FORMAT_STRING, numberFormat)); renderer.setBaseItemLabelsVisible(true); return renderer; }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException if cloning is not supported. */ @Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Creates a new renderer for candlestick charts. * <P> * Use -1 for the candle width if you prefer the width to be calculated * automatically. * * @param candleWidth The candle width. */ public CandlestickRenderer(double candleWidth) { this(candleWidth, true, new HighLowItemLabelGenerator()); }
plot.setSimpleLabels(true); PieSectionLabelGenerator gen = new StandardPieSectionLabelGenerator( "{0}: {1} ({2})", new DecimalFormat("0"), new DecimalFormat("0%")); plot.setLabelGenerator(gen);
StackedBarRenderer renderer = new StackedBarRenderer(false); renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator()); renderer.setBaseItemLabelsVisible(true); chart.getCategoryPlot().setRenderer(renderer);`
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException should not happen. */ @Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Generates the tool tip text for an item in a dataset. * * @param dataset the dataset (<code>null</code> not permitted). * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The tooltip text (possibly <code>null</code>). */ public String generateToolTip(XYDataset dataset, int series, int item) { return generateLabelString(dataset, series, item); }
/** * Generates a label for a pie section. * * @param dataset the dataset ({@code null} not permitted). * @param key the section key ({@code null} not permitted). * * @return The label (possibly {@code null}). */ @Override public String generateSectionLabel(PieDataset dataset, Comparable key) { return super.generateSectionLabel(dataset, key); }
/** * Generates a tool tip text item for one section in a pie chart. * * @param dataset the dataset ({@code null} not permitted). * @param key the section key ({@code null} not permitted). * * @return The tool tip text (possibly {@code null}). */ @Override public String generateToolTip(PieDataset dataset, Comparable key) { return generateSectionLabel(dataset, key); }
/** * Generates the item label text for an item in a dataset. * * @param dataset the dataset (<code>null</code> not permitted). * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The label text (possibly <code>null</code>). */ public String generateLabel(XYDataset dataset, int series, int item) { return generateLabelString(dataset, series, item); }
/** * Generates the item label text for an item in a dataset. * * @param dataset the dataset (<code>null</code> not permitted). * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The label text (possibly <code>null</code>). */ public String generateLabel(XYDataset dataset, int series, int item) { return generateLabelString(dataset, series, item); }
/** * Generates an item label for a particular item within a series. * * @param dataset the dataset (<code>null</code> not permitted). * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The item label (possibly <code>null</code>). */ public String generateLabel(XYDataset dataset, int series, int item) { return generateLabelString(dataset, series, item); }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException if cloning is not supported. */ @Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException should not happen. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException if cloning is not supported. */ @Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException should not happen. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException if cloning is not supported. */ @Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException if cloning is not supported. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException if cloning is not supported. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException if cloning is not supported. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }