Package com.invient.vaadin.charts.Color

Examples of com.invient.vaadin.charts.Color.RGBA


        // Set plot options
        AreaConfig areaCfg = new AreaConfig();

        List<LinearColorStop> colorStops = new ArrayList<Gradient.LinearGradient.LinearColorStop>();
        colorStops.add(new LinearColorStop(0, new RGB(69, 114, 167)));
        colorStops.add(new LinearColorStop(1, new RGBA(2, 0, 0, 0)));
        // Fill color
        areaCfg.setFillColor(new Gradient.LinearGradient(0, 0, 0, 300,
                colorStops));

        areaCfg.setLineWidth(1);
View Full Code Here


                masterDateTimeAxis.removePlotBand("mask-before");
                DateTimePlotBand plotBandBefore = new DateTimePlotBand(
                        "mask-before");
                plotBandBefore.setRange(new DateTimeRange(masterChartMinDate,
                        new Date((long) min)));
                plotBandBefore.setColor(new RGBA(0, 0, 0, 0.2f));
                masterDateTimeAxis.addPlotBand(plotBandBefore);

                masterDateTimeAxis.removePlotBand("mask-after");
                DateTimePlotBand plotBandAfter = new DateTimePlotBand(
                        "mask-after");
                plotBandAfter.setRange(new DateTimeRange(new Date((long) max),
                        masterChartMaxDate));
                plotBandAfter.setColor(new RGBA(0, 0, 0, 0.2f));
                masterDateTimeAxis.addPlotBand(plotBandAfter);
                masterChart.refresh();
            }
        });
        // Add master
View Full Code Here

        xAxis.setShowLastLabel(true);
        xAxis.setMaxZoom(14 * 24 * 3600000);
        DateTimePlotBand plotBand = new DateTimePlotBand("mask-before");
        plotBand.setRange(new DateTimeRange(masterChartMinDate,
                detailChartPointStartDate));
        plotBand.setColor(new RGBA(0, 0, 0, 0.2f));
        xAxis.addPlotBand(plotBand);
        xAxis.setTitle(new AxisTitle(""));

        LinkedHashSet<XAxis> xAxes = new LinkedHashSet<InvientChartsConfig.XAxis>();
        xAxes.add(xAxis);
        chartConfig.setXAxes(xAxes);

        NumberYAxis yAxis = new NumberYAxis();
        yAxis.setShowFirstLabel(false);
        yAxis.setMin(0.6);
        yAxis.setGrid(new Grid());
        yAxis.getGrid().setLineWidth(0);
        yAxis.setLabel(new YAxisDataLabel(false));
        yAxis.setTitle(new AxisTitle(""));

        LinkedHashSet<YAxis> yAxes = new LinkedHashSet<InvientChartsConfig.YAxis>();
        yAxes.add(yAxis);
        chartConfig.setYAxes(yAxes);

        chartConfig.getTooltip().setFormatterJsFunc(
                "function() { return false; }");

        chartConfig.getLegend().setEnabled(false);
        chartConfig.getCredit().setEnabled(false);

        // Plot options
        AreaConfig areaCfg = new AreaConfig();
        List<LinearColorStop> colorStops = new ArrayList<Gradient.LinearGradient.LinearColorStop>();
        colorStops.add(new LinearColorStop(0, new RGB(69, 114, 167)));
        colorStops.add(new LinearColorStop(1, new RGBA(0, 0, 0, 0)));
        // Fill color
        areaCfg.setFillColor(new Gradient.LinearGradient(0, 0, 0, 70,
                colorStops));
        areaCfg.setLineWidth(1);
        areaCfg.setMarker(new SymbolMarker(false));
View Full Code Here

        CategoryAxis xAxis = new CategoryAxis();
        xAxis.setCategories(Arrays.asList("Monday", "Tuesday", "Wednesday",
                "Thursday", "Friday", "Saturday", "Sunday"));
        NumberPlotBand plotBand = new NumberPlotBand("sat-sun");
        plotBand.setRange(new NumberRange(4.6, 6.5));
        plotBand.setColor(new RGBA(68, 170, 213, 0.2f));
        xAxis.addPlotBand(plotBand);

        LinkedHashSet<XAxis> xAxesSet = new LinkedHashSet<InvientChartsConfig.XAxis>();
        xAxesSet.add(xAxis);
        chartConfig.setXAxes(xAxesSet);
View Full Code Here

        chartConfig.addSeriesConfig(scatterCfg);

        InvientCharts chart = new InvientCharts(chartConfig);

        ScatterConfig femaleScatterCfg = new ScatterConfig();
        femaleScatterCfg.setColor(new RGBA(223, 83, 83, 0.5f));
        XYSeries series = new XYSeries("Female", femaleScatterCfg);
        series.setSeriesPoints(getScatterFemalePoints(series));
        chart.addSeries(series);

        ScatterConfig maleScatterCfg = new ScatterConfig();
        maleScatterCfg.setColor(new RGBA(119, 152, 191, 0.5f));
        series = new XYSeries("Male", maleScatterCfg);
        series.setSeriesPoints(getScatterMalePoints(series));
        chart.addSeries(series);
        addChart(chart);
    }
View Full Code Here

        yAxis.getMinorGrid().setLineWidth(0);
        yAxis.setGrid(new Grid());
        yAxis.getGrid().setLineWidth(0);
        NumberPlotBand numberBand = new NumberPlotBand("Light air");
        numberBand.setRange(new NumberRange(0.3, 1.5));
        numberBand.setColor(new RGBA(68, 170, 213, 0.1f));
        numberBand.setLabel(new PlotLabel("Light air"));
        numberBand.getLabel().setStyle("{ color: '#606060' }");
        yAxis.getPlotBands().add(numberBand);

        numberBand = new NumberPlotBand("Light breeze");
        numberBand.setRange(new NumberRange(1.5, 3.3));
        numberBand.setColor(new RGBA(0, 0, 0, 0.0f));
        numberBand.setLabel(new PlotLabel("Light breeze"));
        numberBand.getLabel().setStyle("{ color: '#606060' }");
        yAxis.getPlotBands().add(numberBand);

        numberBand = new NumberPlotBand("Gentle breeze");
        numberBand.setRange(new NumberRange(3.3, 5.5));
        numberBand.setColor(new RGBA(68, 170, 213, 0.1f));
        numberBand.setLabel(new PlotLabel("Gentle breeze"));
        numberBand.getLabel().setStyle("{ color: '#606060' }");
        yAxis.getPlotBands().add(numberBand);

        numberBand = new NumberPlotBand("Moderate breeze");
        numberBand.setRange(new NumberRange(5.5, 8.0));
        numberBand.setColor(new RGBA(0, 0, 0, 0.0f));
        numberBand.setLabel(new PlotLabel("Moderate breeze"));
        numberBand.getLabel().setStyle("{ color: '#606060' }");
        yAxis.getPlotBands().add(numberBand);

        numberBand = new NumberPlotBand("Fresh breeze");
        numberBand.setRange(new NumberRange(8.0, 11.0));
        numberBand.setColor(new RGBA(68, 170, 213, 0.1f));
        numberBand.setLabel(new PlotLabel("Fresh breeze"));
        numberBand.getLabel().setStyle("{ color: '#606060' }");
        yAxis.getPlotBands().add(numberBand);

        numberBand = new NumberPlotBand("Strong breeze");
        numberBand.setRange(new NumberRange(11.0, 14.0));
        numberBand.setColor(new RGBA(0, 0, 0, 0.0f));
        numberBand.setLabel(new PlotLabel("Strong breeze"));
        numberBand.getLabel().setStyle("{ color: '#606060' }");
        yAxis.getPlotBands().add(numberBand);

        numberBand = new NumberPlotBand("High wind");
        numberBand.setRange(new NumberRange(14.0, 15.0));
        numberBand.setColor(new RGBA(68, 170, 213, 0.1f));
        numberBand.setLabel(new PlotLabel("High wind"));
        numberBand.getLabel().setStyle("{ color: '#606060' }");
        yAxis.getPlotBands().add(numberBand);

        LinkedHashSet<YAxis> yAxesSet = new LinkedHashSet<InvientChartsConfig.YAxis>();
View Full Code Here

TOP

Related Classes of com.invient.vaadin.charts.Color.RGBA

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.