Examples of addHorizontalRangeMarker()


Examples of com.googlecode.charts4j.LineChart.addHorizontalRangeMarker()

    //Note that data, grids, axis labels, range markers all snap together nicely.
    public void example2() {
        // EXAMPLE CODE START
        Plot plot = Plots.newPlot(Data.newData(0, 66.6, 33.3, 100));
        LineChart chart = GCharts.newLineChart(plot);
        chart.addHorizontalRangeMarker(33.3, 66.6, LIGHTBLUE);
        chart.setGrid(33.3, 33.3, 3, 3);
        chart.addXAxisLabels(AxisLabelsFactory.newAxisLabels(Arrays.asList("Peak","Valley"), Arrays.asList(33.3,66.6)));
        chart.addYAxisLabels(AxisLabelsFactory.newNumericAxisLabels(0,33.3,66.6,100));
        String url = chart.toURLString();
        // EXAMPLE CODE END. Use this url string in your web or
View Full Code Here

Examples of com.googlecode.charts4j.LineChart.addHorizontalRangeMarker()

        // Defining chart.
        LineChart chart = GCharts.newLineChart(line1, line2);
        chart.setSize(600, 450);
        chart.setTitle("Web Traffic|(in billions of hits)", WHITE, 14);
        chart.addHorizontalRangeMarker(40, 60, Color.newColor(RED, 30));
        chart.addVerticalRangeMarker(70, 90, Color.newColor(GREEN, 30));
        chart.setGrid(25, 25, 3, 2);

        // Defining axis info and styles
        AxisStyle axisStyle = AxisStyle.newAxisStyle(WHITE, 12, AxisTextAlignment.CENTER);
View Full Code Here

Examples of com.googlecode.charts4j.XYLineChart.addHorizontalRangeMarker()

        double good = DataUtil.scaleWithinRange(minMin, maxMax, new double[]{0.01}).getData()[0];
        double bad = DataUtil.scaleWithinRange(minMin, maxMax, new double[]{0.03}).getData()[0];
        double wrong = DataUtil.scaleWithinRange(minMin, maxMax, new double[]{0.05}).getData()[0];

        if (0 <= good && good < 100) {
            chart.addHorizontalRangeMarker(good, Math.min(bad, 100), Color.LIGHTGREEN);
        }
        if (0 <= bad && bad < 100) {
            chart.addHorizontalRangeMarker(bad, Math.min(wrong, 100), Color.LIGHTGOLDENRODYELLOW);
        }
        if (wrong < 100) {
View Full Code Here

Examples of com.googlecode.charts4j.XYLineChart.addHorizontalRangeMarker()

        if (0 <= good && good < 100) {
            chart.addHorizontalRangeMarker(good, Math.min(bad, 100), Color.LIGHTGREEN);
        }
        if (0 <= bad && bad < 100) {
            chart.addHorizontalRangeMarker(bad, Math.min(wrong, 100), Color.LIGHTGOLDENRODYELLOW);
        }
        if (wrong < 100) {
            chart.addHorizontalRangeMarker(Math.max(wrong, 0), 100, Color.LIGHTCORAL);
        }
View Full Code Here

Examples of com.googlecode.charts4j.XYLineChart.addHorizontalRangeMarker()

        }
        if (0 <= bad && bad < 100) {
            chart.addHorizontalRangeMarker(bad, Math.min(wrong, 100), Color.LIGHTGOLDENRODYELLOW);
        }
        if (wrong < 100) {
            chart.addHorizontalRangeMarker(Math.max(wrong, 0), 100, Color.LIGHTCORAL);
        }


        String url = chart.toURLForHTML();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.