本文整理汇总了Java中org.jfree.data.time.TimeTableXYDataset类的典型用法代码示例。如果您正苦于以下问题:Java TimeTableXYDataset类的具体用法?Java TimeTableXYDataset怎么用?Java TimeTableXYDataset使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TimeTableXYDataset类属于org.jfree.data.time包,在下文中一共展示了TimeTableXYDataset类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testStandard
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
/**
* Some checks for a simple dataset.
*/
public void testStandard() {
TimeTableXYDataset d = new TimeTableXYDataset();
d.add(new Year(1999), 1.0, "Series 1");
assertEquals(d.getItemCount(), 1);
assertEquals(d.getSeriesCount(), 1);
d.add(new Year(2000), 2.0, "Series 2");
assertEquals(d.getItemCount(), 2);
assertEquals(d.getSeriesCount(), 2);
assertEquals(d.getYValue(0, 0), 1.0, DELTA);
assertTrue(Double.isNaN(d.getYValue(0, 1)));
assertTrue(Double.isNaN(d.getYValue(1, 0)));
assertEquals(d.getYValue(1, 1), 2.0, DELTA);
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:17,代码来源:TimeTableXYDatasetTests.java
示例2: testGetTimePeriod
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
/**
* Some checks for the getTimePeriod() method.
*/
public void testGetTimePeriod() {
TimeTableXYDataset d = new TimeTableXYDataset();
d.add(new Year(1999), 1.0, "Series 1");
d.add(new Year(1998), 2.0, "Series 1");
d.add(new Year(1996), 3.0, "Series 1");
assertEquals(d.getTimePeriod(0), new Year(1996));
assertEquals(d.getTimePeriod(1), new Year(1998));
assertEquals(d.getTimePeriod(2), new Year(1999));
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:13,代码来源:TimeTableXYDatasetTests.java
示例3: processNode
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
public void processNode(Object name, Map map, Object value) throws Exception {
if(value != null && value instanceof TimeTableXYDataset) {
this.xyDataset = (TimeTableXYDataset)value;
}else {
// TODO
}
}
开发者ID:davetcc,项目名称:groovychart,代码行数:8,代码来源:TimeTableXYDatasetBuilder.java
示例4: buildSmallMidLargeCapChart
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
private ChartPanel buildSmallMidLargeCapChart(TimeSeriesModel timeSeriesModel) {
TimeTableXYDataset xyDataset = buildTimeTableXYDataset(timeSeriesModel, smallMidLargeAreaTimeSeriesTypes);
LegendItemCollection legendItems = new LegendItemCollection();
legendItems.add(new LegendItem(resourceManager.getString("smallcap"), Color.blue));
legendItems.add(new LegendItem(resourceManager.getString("midcap"), Color.magenta));
legendItems.add(new LegendItem(resourceManager.getString("largecap"), Color.green));
XYItemRenderer xyItemRenderer = buildXYAreaRenderer(Color.blue, Color.magenta, Color.green);
XYPlot xyPlot = new XYPlot(xyDataset, buildDateAxis(), buildNumberAxis(), xyItemRenderer);
xyPlot.setRangeAxis(1, buildNumberAxis());
xyPlot.mapDatasetToRangeAxes(0, buildRangeAxes());
xyPlot.setFixedLegendItems(legendItems);
applyXYPlotLookAndFeel(xyPlot, false);
xyPlots.add(xyPlot);
return buildChartPanel(buildChart(smallMidLargeCap, xyPlot));
}
开发者ID:objektwerks,项目名称:swing,代码行数:16,代码来源:TimeSeriesChartPanel.java
示例5: buildValueCoreGrowthChart
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
private ChartPanel buildValueCoreGrowthChart(TimeSeriesModel timeSeriesModel) {
TimeTableXYDataset xyDataset = buildTimeTableXYDataset(timeSeriesModel, valueCoreGrowthAreaTimeSeriesTypes);
LegendItemCollection legendItems = new LegendItemCollection();
legendItems.add(new LegendItem(resourceManager.getString("value"), Color.cyan));
legendItems.add(new LegendItem(resourceManager.getString("core"), Color.yellow));
legendItems.add(new LegendItem(resourceManager.getString("growth"), Color.black));
XYItemRenderer xyItemRenderer = buildXYAreaRenderer(Color.cyan, Color.yellow, Color.black);
XYPlot xyPlot = new XYPlot(xyDataset, buildDateAxis(), buildNumberAxis(), xyItemRenderer);
xyPlot.setRangeAxis(1, buildNumberAxis());
xyPlot.mapDatasetToRangeAxes(0, buildRangeAxes());
xyPlot.setFixedLegendItems(legendItems);
applyXYPlotLookAndFeel(xyPlot, false);
xyPlots.add(xyPlot);
return buildChartPanel(buildChart(valueCoreGrowth, xyPlot));
}
开发者ID:objektwerks,项目名称:swing,代码行数:16,代码来源:TimeSeriesChartPanel.java
示例6: getDataset
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public Dataset getDataset() {
Map<String, TimePeriodCollater> seriesToPeriodMap = new HashMap<String, TimePeriodCollater>();
TimeTableXYDataset dataset = new TimeTableXYDataset();
for (ResultsSummary summary : getResultsList())
{
String[] seriesKeys = getSeriesKeys(summary);
if (seriesKeys != null) {
for (int i = 0; (i < seriesKeys.length); i++) {
String key = seriesKeys[i];
Date buildDate = summary.getBuildDate();
TimePeriodCollater collaterForSeries = (TimePeriodCollater) seriesToPeriodMap.get(key);
if (collaterForSeries == null) {
collaterForSeries = createCollater(getPeriod(buildDate, getPeriodRange()), key);
collaterForSeries.addResult(summary);
seriesToPeriodMap.put(key, collaterForSeries);
} else if (isInPeriod(collaterForSeries.getPeriod(), buildDate)) {
collaterForSeries.addResult(summary);
} else {
writeCollaterToDataSet(dataset, collaterForSeries);
RegularTimePeriod nextPeriod = collaterForSeries.getPeriod().next();
while (!isInPeriod(nextPeriod, buildDate)) {
nextPeriod = nextPeriod.next();
}
collaterForSeries = createCollater(nextPeriod, key);
collaterForSeries.addResult(summary);
seriesToPeriodMap.put(key, collaterForSeries);
}
}
}
}
Collection<TimePeriodCollater> finalPeriods = seriesToPeriodMap.values();
TimePeriodCollater timePeriodCollater;
for (Iterator<TimePeriodCollater> iterator = finalPeriods.iterator(); iterator.hasNext(); writeCollaterToDataSet(dataset, timePeriodCollater)) {
timePeriodCollater = iterator.next();
}
return dataset;
}
开发者ID:javiergutites,项目名称:bamboo-checkstyle-plugin,代码行数:39,代码来源:AbstractMultiSeriesTimePeriodCollector.java
示例7: run
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
/********************************************************************************************************
* run().
*
* @return
*/
private String run() {
if ((resultsList != null) && !resultsList.isEmpty()) {
ModuleDescriptor descriptor = pluginManager.getPluginModule(getReportKey());
if (descriptor != null) {
ReportCollector collector = (ReportCollector) descriptor.getModule();
collector.setResultsList(getResultsList());
collector.setParams(Collections.EMPTY_MAP);
dataset = (TimeTableXYDataset) collector.getDataset();
}
}
return SUCCESS;
}
开发者ID:javiergutites,项目名称:bamboo-checkstyle-plugin,代码行数:18,代码来源:ViewCheckStyleSummary.java
示例8: testClear
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
/**
* Test clearing data.
*/
public void testClear() {
TimeTableXYDataset d = new TimeTableXYDataset();
d.add(new Year(1999), 1.0, "Series 1");
assertEquals(d.getItemCount(), 1);
assertEquals(d.getSeriesCount(), 1);
d.add(new Year(2000), 2.0, "Series 2");
d.clear();
// Make sure there's nothing left
assertEquals(0, d.getItemCount());
assertEquals(0, d.getSeriesCount());
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:16,代码来源:TimeTableXYDatasetTests.java
示例9: createDataset
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
/** Create the dataset used for the plot. */
private TimeTableXYDataset createDataset() {
TimeTableXYDataset dataset = new TimeTableXYDataset();
for (SeriesDescriptor seriesDesriptor : seriesList) {
String seriesTitle = seriesDesriptor.seriesTitle;
TimeSeries timeSeries = createTimeSeries(seriesTitle,
seriesDesriptor.series);
for (int i = 0; i < timeSeries.getItemCount(); ++i) {
TimeSeriesDataItem di = timeSeries.getDataItem(i);
dataset.add(di.getPeriod(), di.getValue().doubleValue(),
seriesTitle);
}
}
return dataset;
}
开发者ID:vimaier,项目名称:conqat,代码行数:16,代码来源:StackedAreaChartCreator.java
示例10: generateToolTip
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
/********************************************************************************************************
* generateToolTip().
*
* @param xyDataset
* @param series
* @param item
* @return
*/
public String generateToolTip(XYDataset xyDataset, int series, int item) {
TimeTableXYDataset dataset = (TimeTableXYDataset) xyDataset;
double checkstyleDelta = dataset.getYValue(series, item);
String authorName = (String) dataset.getSeriesKey(series);
TimePeriod timePeriod = dataset.getTimePeriod(item);
return NumberUtils.round(checkstyleDelta, 1) + " CheckStyle violation delta on " + timePeriod + " for " + authorName;
}
开发者ID:javiergutites,项目名称:bamboo-checkstyle-plugin,代码行数:16,代码来源:CheckStyleDeltaByAuthorLineChart.java
示例11: generateToolTip
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
/********************************************************************************************************
* generateToolTip().
*
* @param xyDataset
* @param series
* @param item
* @return
*/
public String generateToolTip(XYDataset xyDataset, int series, int item) {
TimeTableXYDataset dataset = (TimeTableXYDataset) xyDataset;
double violations = dataset.getYValue(series, item);
String buildKey = (String) dataset.getSeriesKey(series);
TimePeriod timePeriod = dataset.getTimePeriod(item);
return "Build in " + timePeriod + " contained " + NumberUtils.round(violations, 1) + " style violations in build " + buildKey;
}
开发者ID:javiergutites,项目名称:bamboo-checkstyle-plugin,代码行数:16,代码来源:ViolationSummaryLineChart.java
示例12: getXyDataset
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
/**
* Getter for property xyDataset.
* @return Value of property xyDataset.
*/
public TimeTableXYDataset getXyDataset() {
return this.xyDataset;
}
开发者ID:davetcc,项目名称:groovychart,代码行数:8,代码来源:TimeTableXYDatasetBuilder.java
示例13: setXyDataset
import org.jfree.data.time.TimeTableXYDataset; //导入依赖的package包/类
/**
* Setter for property xyDataset.
* @param xyDataset New value of property xyDataset.
*/
public void setXyDataset(TimeTableXYDataset xyDataset) {
this.xyDataset = xyDataset;
}
开发者ID:davetcc,项目名称:groovychart,代码行数:8,代码来源:TimeTableXYDatasetBuilder.java
注:本文中的org.jfree.data.time.TimeTableXYDataset类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论