Package com.googlecode.wickedcharts.highcharts.options

Examples of com.googlecode.wickedcharts.highcharts.options.Options


            max = maxOf(max, summaryMax);
        }
        min = minOf(min, BigDecimal.ZERO);
        max = maxOf(max, BigDecimal.ZERO);
       
        Options options = new Options();
        options.setChartOptions(new ChartOptions().setType(SeriesType.COLUMN));
       
        options.setTitle(new Title("Summary"));
       
        options.setxAxis(new Axis().setCategories(titles));
        options.setyAxis(new Axis().setMin(min).setMax(max));
       
        options.setLegend(
                new Legend()
                    .setLayout(LegendLayout.VERTICAL)
                    .setBackgroundColor(new HexColor("#FFFFFF"))
                    .setAlign(HorizontalAlignment.LEFT)
                    .setVerticalAlign(VerticalAlignment.TOP).setX(100).setY(70).setFloating(Boolean.TRUE).setShadow(Boolean.TRUE));
       
        options.setTooltip(
                new Tooltip().setFormatter(new Function().setFunction(" return ''+ this.x +': '+ this.y;")));
       
        options.setPlotOptions(
                new PlotOptionsChoice()
                .setColumn(new PlotOptions().setPointPadding(0.2f).setBorderWidth(0)));

        for (Summary summary : summaries) {
            String propertyName = summary.getPropertyName();
            Series<Number> setData = new SimpleSeries().setName(propertyName).setData(summary.getValuesAsNumbers());
            options.addSeries(setData);
        }
       
        return new WickedChart(options);
    }
View Full Code Here


    private ValueModel asValueModel(WickedChart chartValue) {
        return new ValueModel(getAdapterManager().adapterFor(chartValue));
    }

    private WickedChart createChartValue(String title, List<String> titles, List<Number> values, Number min, Number max) {
        Options options = new Options();
        options.setChartOptions(new ChartOptions().setType(SeriesType.COLUMN));
       
        options.setTitle(new Title(title));
       
        options.setxAxis(new Axis().setCategories(titles));
        options.setyAxis(new Axis().setMin(min).setMax(max));
       
        options.setLegend(
                new Legend()
                    .setLayout(LegendLayout.VERTICAL)
                    .setBackgroundColor(new HexColor("#FFFFFF"))
                    .setAlign(HorizontalAlignment.LEFT)
                    .setVerticalAlign(VerticalAlignment.TOP).setX(100).setY(70).setFloating(Boolean.TRUE).setShadow(Boolean.TRUE));
       
        options.setTooltip(
                new Tooltip().setFormatter(new Function().setFunction(" return ''+ this.x +': '+ this.y;")));
       
        options.setPlotOptions(
                new PlotOptionsChoice()
                    .setColumn(new PlotOptions().setPointPadding(0.2f).setBorderWidth(0)));
       
        Series<Number> setData = new SimpleSeries().setName("Value").setData(values);
        options.addSeries(setData);
       
        return new WickedChart(options);
    }
View Full Code Here

       
        assertThat(jsonBefore, is(jsonAfter));
    }

    Options createOptions() {
        Options options = new Options();

        options.setChartOptions(new ChartOptions().setType(SeriesType.LINE));

        options.setTitle(new Title("My very own chart."));

        options.setxAxis(new Axis().setCategories(Arrays.asList(new String[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" })));

        options.setyAxis(new Axis().setTitle(new Title("Temperature (C)")));

        options.setLegend(new Legend().setLayout(LegendLayout.VERTICAL).setAlign(HorizontalAlignment.RIGHT).setVerticalAlign(VerticalAlignment.TOP).setX(-10).setY(100).setBorderWidth(0));

        options.addSeries(new SimpleSeries().setName("Tokyo").setData(Arrays.asList(new Number[] { 7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6 })));

        options.addSeries(new SimpleSeries().setName("New York").setData(Arrays.asList(new Number[] { -0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5 })));
        return options;
    }
View Full Code Here

        final ValueModel model = getModel();
        final ObjectAdapter chartAdapter = model.getObject();
        final Object chartObj = chartAdapter.getObject();
        WickedChart chart = (WickedChart) chartObj;
        Options options = chart.getOptions();
       
        addOrReplace(new Chart("chart", options));
    }
View Full Code Here

    private ValueModel asValueModel(WickedChart chartValue) {
        return new ValueModel(getAdapterManager().adapterFor(chartValue));
    }

    private WickedChart createChartValue(String title, List<String> titles, List<Number> values, Number min, Number max) {
        Options options = new Options();
        options.setChartOptions(new ChartOptions().setType(SeriesType.COLUMN));
       
        options.setTitle(new Title(title));
       
        options.setxAxis(new Axis().setCategories(titles));
        options.setyAxis(new Axis().setMin(min).setMax(max));
       
        options.setLegend(
                new Legend()
                    .setLayout(LegendLayout.VERTICAL)
                    .setBackgroundColor(new HexColor("#FFFFFF"))
                    .setAlign(HorizontalAlignment.LEFT)
                    .setVerticalAlign(VerticalAlignment.TOP).setX(100).setY(70).setFloating(Boolean.TRUE).setShadow(Boolean.TRUE));
       
        options.setTooltip(
                new Tooltip().setFormatter(new Function().setFunction(" return ''+ this.x +': '+ this.y;")));
       
        options.setPlotOptions(
                new PlotOptionsChoice()
                    .setColumn(new PlotOptions().setPointPadding(0.2f).setBorderWidth(0)));
       
        Series<Number> setData = new SimpleSeries().setName("Value").setData(values);
        options.addSeries(setData);
       
        return new WickedChart(options);
    }
View Full Code Here

       
        assertThat(jsonBefore, is(jsonAfter));
    }

    Options createOptions() {
        Options options = new Options();

        options.setChartOptions(new ChartOptions().setType(SeriesType.LINE));

        options.setTitle(new Title("My very own chart."));

        options.setxAxis(new Axis().setCategories(Arrays.asList(new String[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" })));

        options.setyAxis(new Axis().setTitle(new Title("Temperature (C)")));

        options.setLegend(new Legend().setLayout(LegendLayout.VERTICAL).setAlign(HorizontalAlignment.RIGHT).setVerticalAlign(VerticalAlignment.TOP).setX(-10).setY(100).setBorderWidth(0));

        options.addSeries(new SimpleSeries().setName("Tokyo").setData(Arrays.asList(new Number[] { 7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6 })));

        options.addSeries(new SimpleSeries().setName("New York").setData(Arrays.asList(new Number[] { -0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5 })));
        return options;
    }
View Full Code Here

        final ValueModel model = getModel();
        final ObjectAdapter chartAdapter = model.getObject();
        final Object chartObj = chartAdapter.getObject();
        WickedChart chart = (WickedChart) chartObj;
        Options options = chart.getOptions();
       
        addOrReplace(new Chart("chart", options));
    }
View Full Code Here

TOP

Related Classes of com.googlecode.wickedcharts.highcharts.options.Options

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.