Package org.jfree.chart.renderer.xy

Examples of org.jfree.chart.renderer.xy.XYBarRenderer$XYBarRendererState


            applyToAbstractRenderer((AbstractRenderer) renderer);
        }
        renderer.setBaseItemLabelFont(this.regularFont);
        renderer.setBaseItemLabelPaint(this.itemLabelPaint);
        if (renderer instanceof XYBarRenderer) {
            XYBarRenderer br = (XYBarRenderer) renderer;
            br.setBarPainter(this.xyBarPainter);
            br.setShadowVisible(this.shadowVisible);
        }
    }
View Full Code Here


            axis.setAutoRangeIncludesZero(false);
            domainAxis = axis;
        }
        ValueAxis valueAxis = new NumberAxis(yAxisLabel);

        XYBarRenderer renderer = new XYBarRenderer();
        if (tooltips) {
            XYToolTipGenerator tt;
            if (dateAxis) {
                tt = StandardXYToolTipGenerator.getTimeSeriesInstance();
            }
            else {
                tt = new StandardXYToolTipGenerator();
            }
            renderer.setBaseToolTipGenerator(tt);
        }
        if (urls) {
            renderer.setURLGenerator(new StandardXYURLGenerator());
        }

        XYPlot plot = new XYPlot(dataset, domainAxis, valueAxis, renderer);
        plot.setOrientation(orientation);
View Full Code Here

        }
        NumberAxis xAxis = new NumberAxis(xAxisLabel);
        xAxis.setAutoRangeIncludesZero(false);
        ValueAxis yAxis = new NumberAxis(yAxisLabel);

        XYItemRenderer renderer = new XYBarRenderer();
        if (tooltips) {
            renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());
        }
        if (urls) {
            renderer.setURLGenerator(new StandardXYURLGenerator());
        }

        XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
        plot.setOrientation(orientation);
        plot.setDomainZeroBaselineVisible(true);
View Full Code Here

            phaseNameList[i] = Translator.translate(phases.get(i));
        SymbolAxis symbolaxis = new SymbolAxis(null, phaseNameList);
        symbolaxis.setGridBandsVisible(false);
        xyplot.setRangeAxis(symbolaxis);

        final XYBarRenderer renderer = (XYBarRenderer) xyplot.getRenderer();
        renderer.setUseYInterval(true);
        renderer.setDrawBarOutline(true);
        renderer.setBaseOutlinePaint(Color.black);

        new PhaseChartColorer(process, phases) {
            public void setItemColor(Object key, int pos, Color c) {
                renderer.setSeriesPaint(pos, c);
            }
        }.run();

        int exceptionSeries = dataset.getSeriesCount()-1;
        renderer.setSeriesPaint(exceptionSeries, EXCEPTION_PAINT);
        renderer.setSeriesFillPaint(exceptionSeries, EXCEPTION_PAINT);
        renderer.setSeriesOutlinePaint(exceptionSeries, EXCEPTION_PAINT);
       
        renderer.setBaseToolTipGenerator(new TooltipGenerator());

        xyplot.setBackgroundPaint(Color.white);
        xyplot.setDomainGridlinesVisible(false);
        xyplot.setRangeGridlinePaint(Color.lightGray);
        xyplot.setDrawingSupplier(DRAWING_SUPPLIER_FACTORY
View Full Code Here

        // create a dataset for displaying schedule data
        chartData = new ChartData();
        updateChart();

        // customize a renderer for displaying schedules
        XYBarRenderer renderer = new XYBarRenderer();
        renderer.setUseYInterval(true);
        renderer.setBaseToolTipGenerator(chartData);
        renderer.setDrawBarOutline(true);

        // use an inverted, unadorned numeric Y-axis
        NumberAxis yAxis = new NumberAxis();
        yAxis.setInverted(true);
        yAxis.setTickLabelsVisible(false);
        yAxis.setTickMarksVisible(false);
        yAxis.setUpperMargin(0);

        // use a Date-based X-axis
        DateAxis xAxis = new DateAxis();

        // create an XY plot to display the data
        XYPlot plot = new XYPlot(chartData, xAxis, yAxis, renderer);
        plot.setOrientation(PlotOrientation.VERTICAL);
        plot.setRangeGridlinesVisible(false);
        plot.setNoDataMessage(TaskScheduleDialog.resources
                .getString("Chart.No_Data_Message"));

        // create a chart and a chart panel
        JFreeChart chart = new JFreeChart(plot);
        chart.removeLegend();
        ChartPanel chartPanel = new ChartPanel(chart);
        chartPanel.setInitialDelay(50);
        chartPanel.setDismissDelay(60000);
        chartPanel.setMinimumDrawHeight(40);
        chartPanel.setMinimumDrawWidth(40);
        chartPanel.setMaximumDrawHeight(3000);
        chartPanel.setMaximumDrawWidth(3000);
        chartPanel.setPreferredSize(new Dimension(300, gridY * 25));

        // add the chart to the dialog content pane
        GridBagConstraints c = new GridBagConstraints();
        c.gridy = gridY;
        c.gridwidth = 4;
        c.weightx = 2;
        c.weighty = 1;
        c.fill = GridBagConstraints.BOTH;
        c.insets = new Insets(10, 0, 0, 0);
        panel.add(chartPanel, c);

        // retrieve the colors used for each chart bar, and register those
        // colors with the schedule rows so they can act as a legend
        for (int i = scheduleRows.size(); i-- > 0;) {
            ScheduleTableRow oneRow = scheduleRows.get(i);
            oneRow.addColoredIcon(renderer.lookupSeriesPaint(i));
        }
    }
View Full Code Here

    XYDataset dataset = createXYDataset(values);
   
    NumberAxis xAxis = new NumberAxis(reportChart.getXAxisLabel());
    NumberAxis yAxis = new NumberAxis(reportChart.getYAxisLabel());
   
    XYBarRenderer renderer = new XYBarRenderer();
    renderer.setToolTipGenerator(new StandardXYToolTipGenerator());   
   
    XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
    plot.setOrientation(PlotOrientation.VERTICAL);
    if (reportChart.getPlotOrientation() == ReportChart.HORIZONTAL)
    {
View Full Code Here

    XYDataset dataset = createTimeDataset(values);
       
    ValueAxis timeAxis = new DateAxis(reportChart.getXAxisLabel());
    NumberAxis valueAxis = new NumberAxis(reportChart.getYAxisLabel());
   
    XYItemRenderer renderer = new XYBarRenderer();
    renderer.setBaseToolTipGenerator(StandardXYToolTipGenerator.getTimeSeriesInstance());   
   
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    plot.setOrientation(PlotOrientation.VERTICAL);
    if (reportChart.getPlotOrientation() == ReportChart.HORIZONTAL)
    {
View Full Code Here

        formatter.setMaximumFractionDigits(2);
        formatter.setMinimumFractionDigits(0);
        yAxis.setNumberFormatOverride(formatter);
        yAxis.setAutoRangeIncludesZero(true);

        return createChart(title, data, xAxis, yAxis, orientation, new XYBarRenderer(),
                GraphDefinition.getDefinition(color));
    }
View Full Code Here

                true,
                false
        );
        XYPlot plot = (XYPlot) chart.getPlot();
        plot.setForegroundAlpha(0.85f);
        XYBarRenderer renderer = (XYBarRenderer) plot.getRenderer();
        renderer.setDrawBarOutline(false);

        return writeImageMap(chart, outputElement, session, printWriter);
    }
View Full Code Here

            applyToAbstractRenderer((AbstractRenderer) renderer);
        }
        renderer.setBaseItemLabelFont(this.regularFont);
        renderer.setBaseItemLabelPaint(this.itemLabelPaint);
        if (renderer instanceof XYBarRenderer) {
            XYBarRenderer br = (XYBarRenderer) renderer;
            br.setBarPainter(this.xyBarPainter);
            br.setShadowVisible(this.shadowVisible);
        }
    }
View Full Code Here

TOP

Related Classes of org.jfree.chart.renderer.xy.XYBarRenderer$XYBarRendererState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.