view artifacts/src/main/java/org/dive4elements/river/jfree/StyledTimeSeries.java @ 8748:36d7bda0b47a

(issue1788) Fix area split if there are no NaN's in the data The split algorithmn splits in a way that it always creates at least two datasets. One before the NaN, one after the NaN. This is broken in case the dataset does not contain any NaN value as it resulted in two identical datasets. This changed the display and resulted in a broken area calculation. I've also added some commented out debug code that was helpful tracking down this problem.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 08 Jun 2015 16:53:54 +0200
parents e4606eae8ea5
children ddcd52d239cd 0a5239a1e46e
line wrap: on
line source
/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
 * Software engineering by Intevation GmbH
 *
 * This file is Free Software under the GNU AGPL (>=v3)
 * and comes with ABSOLUTELY NO WARRANTY! Check out the
 * documentation coming with Dive4Elements River for details.
 */

package org.dive4elements.river.jfree;

import org.apache.log4j.Logger;
import org.dive4elements.river.themes.ThemeDocument;

import org.jfree.data.time.TimeSeries;


/**
 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
 */
public class StyledTimeSeries extends TimeSeries implements StyledSeries {

    private static final Logger log =
        Logger.getLogger(StyledTimeSeries.class);


    protected Style style;


    public StyledTimeSeries(String key, ThemeDocument theme) {
        super(key);
        setStyle(new XYStyle(theme));
    }


    @Override
    public void setStyle(Style style) {
        this.style = style;
    }


    @Override
    public Style getStyle() {
        return style;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org