Example usage for org.jfree.data.time TimeSeries getTimePeriods

List of usage examples for org.jfree.data.time TimeSeries getTimePeriods

Introduction

In this page you can find the example usage for org.jfree.data.time TimeSeries getTimePeriods.

Prototype

public Collection getTimePeriods() 

Source Link

Document

Returns a collection of all the time periods in the time series.

Usage

From source file:net.atomique.ksar.graph.Graph.java

public String make_csv() {
    StringBuilder tmp = new StringBuilder();
    tmp.append("Date;");
    tmp.append(getCsvHeader());//from   w w  w .j av a 2s.  com
    tmp.append("\n");
    TimeSeries datelist = Stats.get(0);
    Iterator ite = datelist.getTimePeriods().iterator();

    while (ite.hasNext()) {
        TimePeriod item = (TimePeriod) ite.next();
        tmp.append(item.toString());
        tmp.append(";");
        tmp.append(getCsvLine((RegularTimePeriod) item));
        tmp.append("\n");
    }

    return tmp.toString();
}

From source file:org.paxle.tools.charts.impl.gui.ChartServlet.java

@SuppressWarnings("unchecked")
public Iterator<RegularTimePeriod> getMergedPeriods(List<TimeSeries> seriesList) {
    TreeSet<RegularTimePeriod> periods = new TreeSet<RegularTimePeriod>();

    for (TimeSeries series : seriesList) {
        if (series.getItemCount() == 0)
            continue;
        periods.addAll(series.getTimePeriods());
    }/*w  w  w  .  j  a  v a  2  s . c  om*/

    return periods.iterator();
}