Examples of addRangeMarker()


Examples of org.jfree.chart.plot.CategoryPlot.addRangeMarker()

        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        JFreeChart chart = ChartFactory.createBarChart(
                "Test Chart", "Category Axis", "Value Axis",
                dataset, PlotOrientation.VERTICAL, true, true, false);
        CategoryPlot plot = (CategoryPlot) chart.getPlot();
        plot.addRangeMarker(new ValueMarker(1.1), Layer.FOREGROUND);
        plot.addRangeMarker(new IntervalMarker(2.2, 3.3), Layer.BACKGROUND);
        JFreeChart chart2 = null;

        // serialize and deserialize the chart....
        try {
View Full Code Here

Examples of org.jfree.chart.plot.CategoryPlot.addRangeMarker()

        JFreeChart chart = ChartFactory.createBarChart(
                "Test Chart", "Category Axis", "Value Axis",
                dataset, PlotOrientation.VERTICAL, true, true, false);
        CategoryPlot plot = (CategoryPlot) chart.getPlot();
        plot.addRangeMarker(new ValueMarker(1.1), Layer.FOREGROUND);
        plot.addRangeMarker(new IntervalMarker(2.2, 3.3), Layer.BACKGROUND);
        JFreeChart chart2 = null;

        // serialize and deserialize the chart....
        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
View Full Code Here

Examples of org.jfree.chart.plot.CategoryPlot.addRangeMarker()

     * Some tests for the addRangeMarker() method(s).
     */
    public void testAddRangeMarker() {
        CategoryPlot plot = new CategoryPlot();
        Marker m = new ValueMarker(1.0);
        plot.addRangeMarker(m);
        List listeners = Arrays.asList(m.getListeners(
                MarkerChangeListener.class));
        assertTrue(listeners.contains(plot));
        plot.clearRangeMarkers();
        listeners = Arrays.asList(m.getListeners(MarkerChangeListener.class));
View Full Code Here

Examples of org.jfree.chart.plot.CategoryPlot.addRangeMarker()

       
       
     // add the target marker
        if(target != null) {
          ValueMarker marker = new ValueMarker( target.doubleValue(), Color.BLACK, new BasicStroke(2.0f));          
          plot.addRangeMarker(marker, Layer.FOREGROUND);
        }
       
       
        //sets different marks
        for (Iterator iterator = intervals.iterator(); iterator.hasNext();) {
View Full Code Here

Examples of org.jfree.chart.plot.CategoryPlot.addRangeMarker()

        //sets different marks
        for (Iterator iterator = intervals.iterator(); iterator.hasNext();) {
      KpiInterval interval = (KpiInterval) iterator.next();
      // add the marks
            IntervalMarker marker = new IntervalMarker(interval.getMin(), interval.getMax(), interval.getColor());
            plot.addRangeMarker(marker, Layer.BACKGROUND);
      logger.debug("Added new interval to the plot");
    }
       
        // customize axes
        CategoryAxis domainAxis = plot.getDomainAxis();
View Full Code Here

Examples of org.jfree.chart.plot.CategoryPlot.addRangeMarker()

       
       
     // add the target marker
        if(target != null) {
          ValueMarker marker = new ValueMarker( target.doubleValue(), Color.BLACK, new BasicStroke(2.0f));          
          plot.addRangeMarker(marker, Layer.FOREGROUND);
        }
       
        //sets different marks
        for (Iterator iterator = intervals.iterator(); iterator.hasNext();) {
      KpiInterval interval = (KpiInterval) iterator.next();
View Full Code Here

Examples of org.jfree.chart.plot.CategoryPlot.addRangeMarker()

        //sets different marks
        for (Iterator iterator = intervals.iterator(); iterator.hasNext();) {
      KpiInterval interval = (KpiInterval) iterator.next();
      // add the marks
            IntervalMarker marker = new IntervalMarker(interval.getMin(), interval.getMax(), interval.getColor());
            plot.addRangeMarker(marker, Layer.BACKGROUND);
      logger.debug("Added new interval to the plot");
    }
       
        // customize axes
        CategoryAxis domainAxis = plot.getDomainAxis();
View Full Code Here

Examples of org.jfree.chart.plot.CategoryPlot.addRangeMarker()

        p2.addDomainMarker(new CategoryMarker("C2"), Layer.BACKGROUND);
        assertTrue(p1.equals(p2));

        p1.addRangeMarker(new ValueMarker(1.0), Layer.FOREGROUND);
        assertFalse(p1.equals(p2));
        p2.addRangeMarker(new ValueMarker(1.0), Layer.FOREGROUND);
        assertTrue(p1.equals(p2));

        p1.addRangeMarker(new ValueMarker(2.0), Layer.BACKGROUND);
        assertFalse(p1.equals(p2));
        p2.addRangeMarker(new ValueMarker(2.0), Layer.BACKGROUND);
View Full Code Here

Examples of org.jfree.chart.plot.CategoryPlot.addRangeMarker()

        p2.addRangeMarker(new ValueMarker(1.0), Layer.FOREGROUND);
        assertTrue(p1.equals(p2));

        p1.addRangeMarker(new ValueMarker(2.0), Layer.BACKGROUND);
        assertFalse(p1.equals(p2));
        p2.addRangeMarker(new ValueMarker(2.0), Layer.BACKGROUND);
        assertTrue(p1.equals(p2));
    }

    /**
     * Some more cloning checks.
View Full Code Here

Examples of org.jfree.chart.plot.CategoryPlot.addRangeMarker()

            true,
            true,
            false
        );
        CategoryPlot plot = (CategoryPlot) chart.getPlot();
        plot.addRangeMarker(new ValueMarker(1.1), Layer.FOREGROUND);
        plot.addRangeMarker(new IntervalMarker(2.2, 3.3), Layer.BACKGROUND);
        JFreeChart chart2 = null;

        // serialize and deserialize the chart....
        try {
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.