Package org.openfaces.component.chart

Examples of org.openfaces.component.chart.PieChartView


    public Plot configurePlot(Chart chart, ModelInfo info) {
        return createPlot(chart, getModel(), info);
    }

    protected Plot createPlot(Chart chart, ChartModel model, ModelInfo info) {
        final PieChartView chartView = (PieChartView) chart.getChartView();

        if (info.isDataEmpty()) {
            return new PiePlotAdapter(null, chart, chartView);
        }

        if (info.getNonEmptySeriesList().length < 2) {
            PieDataset ds = ModelConverter.toPieDataset(model);
            final Plot adapter = (chartView.isEnable3D())
                    ? new PiePlot3DAdapter(ds, chart, chartView)
                    : new PiePlotAdapter(ds, chart, chartView);

            return adapter;
        }
View Full Code Here


    private static String getDynamicProperties(Chart chart, ChartViewValueExpression view, ChartEntity entity) {
        GridPointInfo info = ChartInfoUtil.getGridPointInfo(entity, chart);
        if (info == null) {
            PieSectorInfo infoPie = ChartInfoUtil.getPieSectorInfo(entity);
            if (infoPie != null) {
                PieChartView pieView = (PieChartView) chart.getChartView();
                pieView.setSector(infoPie);
                String res = (String) DynamicPropertiesUtils.getDynamicValue("sector", infoPie, view);
                pieView.setSector(null);
                return res;
            }
        } else {
            GridChartView gridView = (GridChartView) chart.getChartView();
            gridView.setPoint(info);
View Full Code Here

    public ShadowConfigurator() {
    }

    public void configure(ConfigurablePlot plot, ChartView view) {
        PieChartView pieChartView = (PieChartView) view;
        PiePlot piePlot = (PiePlot) plot;

        piePlot.setShadowPaint(pieChartView.getShadowColor());
        piePlot.setShadowXOffset(pieChartView.getShadowXOffset());
        piePlot.setShadowYOffset(pieChartView.getShadowYOffset());
    }
View Full Code Here

TOP

Related Classes of org.openfaces.component.chart.PieChartView

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.