当前位置: 首页>>代码示例>>Java>>正文


Java TimeSeriesCollection.setDomainIsPointsInTime方法代码示例

本文整理汇总了Java中org.jfree.data.time.TimeSeriesCollection.setDomainIsPointsInTime方法的典型用法代码示例。如果您正苦于以下问题:Java TimeSeriesCollection.setDomainIsPointsInTime方法的具体用法?Java TimeSeriesCollection.setDomainIsPointsInTime怎么用?Java TimeSeriesCollection.setDomainIsPointsInTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.data.time.TimeSeriesCollection的用法示例。


在下文中一共展示了TimeSeriesCollection.setDomainIsPointsInTime方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createVolumeDataset

import org.jfree.data.time.TimeSeriesCollection; //导入方法依赖的package包/类
private IntervalXYDataset createVolumeDataset() {
  List<IRate> rates = rateProvider.getRates(base, quote);
  TimeSeries series = new TimeSeries("Volume");
  boolean non_zero_found = false;
  if (rates != null) {
    for (IRate rate : rates) {
      Date date = new Date(rate.getTimestamp());
      double vol = rate.getTotalVol();
      series.addOrUpdate(new Hour(date), vol);
      if (vol > 0)
        non_zero_found = true;
    }
  }
  if (non_zero_found == false)
    return null;

  TimeSeriesCollection dataset = new TimeSeriesCollection(series);
  dataset.setDomainIsPointsInTime(true);
  return dataset;
}
 
开发者ID:incentivetoken,项目名称:offspring,代码行数:21,代码来源:OffspringChartComposite.java

示例2: createDataset

import org.jfree.data.time.TimeSeriesCollection; //导入方法依赖的package包/类
private XYDataset createDataset(TimeSeries timeseries[], TimeSeries timeSeriesSensibilidad[]){
    
    TimeSeriesCollection dataset = new TimeSeriesCollection();
    dataset.setDomainIsPointsInTime(true);
    
        for(int i = 0; i < timeseries.length;i++){
            timeseries[i] = new TimeSeries("Path" + (i+1), Second.class);
            //path1.add(new Second(0, 0, 0, 7, 12, 2011), 0.0);
            dataset.addSeries(timeseries[i]);
        }
        
        for(int i = 0; i < timeSeriesSensibilidad.length;i++){
            timeSeriesSensibilidad[i] = new TimeSeries("Sensibilidad Rx", Second.class);
            //path1.add(new Second(0, 0, 0, 7, 12, 2011), 0.0);
            dataset.addSeries(timeSeriesSensibilidad[i]);
        }
    
    /*
    fecha = new Date();
    timeSeriesSensibilidad.addOrUpdate(new Second(fecha.getSeconds(), fecha.getMinutes(), fecha.getHours(), 
             fecha.getDate(), fecha.getMonth()+1, 2012), -80);
     */
    return dataset;
}
 
开发者ID:danielbejaranogonzalez,项目名称:Mobile-Network-LTE,代码行数:25,代码来源:VentanaRunSimulacion.java

示例3: createDataset1

import org.jfree.data.time.TimeSeriesCollection; //导入方法依赖的package包/类
/**
 * Creates a sample dataset.
 *
 * @return Series 1.
 */
private IntervalXYDataset createDataset1() {

    // create dataset 1...
    TimeSeries series1 = new TimeSeries("Series 1", Day.class);
    series1.add(new Day(1, SerialDate.MARCH, 2002), 12353.3);
    series1.add(new Day(2, SerialDate.MARCH, 2002), 13734.4);
    series1.add(new Day(3, SerialDate.MARCH, 2002), 14525.3);
    series1.add(new Day(4, SerialDate.MARCH, 2002), 13984.3);
    series1.add(new Day(5, SerialDate.MARCH, 2002), 12999.4);
    series1.add(new Day(6, SerialDate.MARCH, 2002), 14274.3);
    series1.add(new Day(7, SerialDate.MARCH, 2002), 15943.5);
    series1.add(new Day(8, SerialDate.MARCH, 2002), 14845.3);
    series1.add(new Day(9, SerialDate.MARCH, 2002), 14645.4);
    series1.add(new Day(10, SerialDate.MARCH, 2002), 16234.6);
    series1.add(new Day(11, SerialDate.MARCH, 2002), 17232.3);
    series1.add(new Day(12, SerialDate.MARCH, 2002), 14232.2);
    series1.add(new Day(13, SerialDate.MARCH, 2002), 13102.2);
    series1.add(new Day(14, SerialDate.MARCH, 2002), 14230.2);
    series1.add(new Day(15, SerialDate.MARCH, 2002), 11235.2);

    TimeSeriesCollection collection = new TimeSeriesCollection(series1);
    collection.setDomainIsPointsInTime(false);  // this tells the time series collection that
                                                // we intend the data to represent time periods
                                                // NOT points in time.  This is required when
                                                // determining the min/max values in the
                                                // dataset's domain.
    return collection;

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:35,代码来源:XYPlotTests.java

示例4: createPriceDataset

import org.jfree.data.time.TimeSeriesCollection; //导入方法依赖的package包/类
private XYDataset createPriceDataset() {
  List<IRate> rates = rateProvider.getRates(base, quote);
  TimeSeries series = new TimeSeries("Price");
  if (rates != null) {
    for (IRate rate : rates) {
      Date date = new Date(rate.getTimestamp());
      series.addOrUpdate(new Hour(date), rate.getPrice());
    }
  }
  TimeSeriesCollection dataset = new TimeSeriesCollection(series);
  dataset.setDomainIsPointsInTime(true);
  return dataset;
}
 
开发者ID:incentivetoken,项目名称:offspring,代码行数:14,代码来源:OffspringChartComposite.java

示例5: createPriceDataset

import org.jfree.data.time.TimeSeriesCollection; //导入方法依赖的package包/类
private XYDataset createPriceDataset() {
  TimeSeries series = new TimeSeries("Price");
  List<Trade> trades = Trade.getTrades(asset.getId());
  for (Trade trade : trades) {
    Date date = new Date(((trade.getTimestamp()) * 1000l)
        + (Constants.EPOCH_BEGINNING - 500L));
    series.addOrUpdate(new Minute(date),
        Double.valueOf(trade.getPrice()) / 100);
  }
  TimeSeriesCollection dataset = new TimeSeriesCollection(series);
  dataset.setDomainIsPointsInTime(true);
  return dataset;
}
 
开发者ID:incentivetoken,项目名称:offspring,代码行数:14,代码来源:AEChartComposite.java

示例6: createDataset

import org.jfree.data.time.TimeSeriesCollection; //导入方法依赖的package包/类
public TimeSeriesCollection createDataset(Map<String, OXFFeatureCollection> entireCollMap, TimeseriesProperties prop, String observedProperty, boolean compress) {

        TimeSeriesCollection dataset = new TimeSeriesCollection();
        OXFFeatureCollection obsColl = entireCollMap.get(prop.getOffering() + "@" + prop.getServiceUrl());

        String foiID = prop.getFeature();
        String obsPropID = prop.getPhenomenon();
        String procID = prop.getProcedure();

        // only if the observation concerns the observedProperty, it
        // will be added to the dataset
        if (obsPropID.equals(observedProperty)) {

            String[] foiIds = new String[] { foiID };
            String[] procedureIds = new String[] { procID };
            String[] observedPropertyIds = new String[] { obsPropID };
            ObservationSeriesCollection seriesCollection = new ObservationSeriesCollection(obsColl, foiIds, observedPropertyIds, procedureIds, true);


            //
            // now let's put in the date-value pairs.
            // ! But put it only in if it differs from the previous
            // one !
            //



            TimeSeries timeSeries = new TimeSeries(prop.getTimeseriesId(), FixedMillisecond.class);




            TimeseriesFactory factory = new TimeseriesFactory(seriesCollection);
            if (seriesCollection.getSortedTimeArray().length > 0) {
                if (compress) {
                    timeSeries = factory.compressToTimeSeries(prop.getTimeseries(), isOverview, prop.getGraphStyle());
                } else {
                    timeSeries = factory.createTimeSeries(prop.getTimeseries(), prop.getGraphStyle());
                }
            }
            dataset.addSeries(timeSeries);
        }

        dataset.setDomainIsPointsInTime(true);

        return dataset;
    }
 
开发者ID:52North,项目名称:SensorWebClient,代码行数:48,代码来源:DiagramRenderer.java


注:本文中的org.jfree.data.time.TimeSeriesCollection.setDomainIsPointsInTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。