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


Java JRChartDataset.TIMEPERIOD_DATASET属性代码示例

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


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

示例1: writeXyBarChart

/**
 *
 */
public void writeXyBarChart(JRChart chart) throws IOException
{
	writer.startElement(JRXmlConstants.ELEMENT_xyBarChart, getNamespace());

	writeChart(chart);
	JRChartDataset dataset = chart.getDataset();

	if( dataset.getDatasetType() == JRChartDataset.TIMESERIES_DATASET ){
		writeTimeSeriesDataset( (JRTimeSeriesDataset)dataset );
	}
	else if( dataset.getDatasetType() == JRChartDataset.TIMEPERIOD_DATASET ){
		writeTimePeriodDataset( (JRTimePeriodDataset)dataset );
	}
	else if( dataset.getDatasetType() == JRChartDataset.XY_DATASET ){
		writeXyDataset( (JRXyDataset)dataset );
	}

	writeBarPlot((JRBarPlot) chart.getPlot());

	writer.closeElement();
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:24,代码来源:JRXmlWriter.java

示例2: writeXyBarChart

/**
 *
 */
public void writeXyBarChart( JRChart chart, String chartName)
{
	if(chart != null)
	{
		write( "JRDesignChart " + chartName + " = new JRDesignChart(jasperDesign, JRChart.CHART_TYPE_XYBAR);\n");
		writeChart( chart, chartName);
		JRChartDataset dataset = chart.getDataset();

		if( dataset.getDatasetType() == JRChartDataset.TIMESERIES_DATASET )
		{
			writeTimeSeriesDataset( (JRTimeSeriesDataset)dataset, chartName, "TimeSeriesDataset");
		}
		else if( dataset.getDatasetType() == JRChartDataset.TIMEPERIOD_DATASET ){
			writeTimePeriodDataset( (JRTimePeriodDataset)dataset, chartName, "XyDataset");
		}
		else if( dataset.getDatasetType() == JRChartDataset.XY_DATASET ){
			writeXyDataset( (JRXyDataset) chart.getDataset(), chartName, "XyDataset");
		}
		writeBarPlot( (JRBarPlot) chart.getPlot(), chartName);
		flush();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:25,代码来源:JRApiWriter.java

示例3: getDatasetType

@Override
public byte getDatasetType() {
	return JRChartDataset.TIMEPERIOD_DATASET;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:4,代码来源:JRBaseTimePeriodDataset.java

示例4: getDatasetType

@Override
public byte getDatasetType() 
{
	return JRChartDataset.TIMEPERIOD_DATASET;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:5,代码来源:JRDesignTimePeriodDataset.java

示例5: getDatasetType

@Override
public byte getDatasetType()
{
	return JRChartDataset.TIMEPERIOD_DATASET;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:5,代码来源:JRFillTimePeriodDataset.java

示例6: createChartHyperlinkProvider

/**
 *
 */
protected ChartHyperlinkProvider createChartHyperlinkProvider()
{
	ChartHyperlinkProvider chartHyperlinkProvider = null;
	
	switch(getChartType()) 
	{
		case JRChart.CHART_TYPE_AREA:
		case JRChart.CHART_TYPE_BAR:
		case JRChart.CHART_TYPE_BAR3D:
		case JRChart.CHART_TYPE_LINE:
		case JRChart.CHART_TYPE_STACKEDBAR3D:
		case JRChart.CHART_TYPE_STACKEDBAR:
		case JRChart.CHART_TYPE_STACKEDAREA:
			chartHyperlinkProvider = new CategoryChartHyperlinkProvider(((JRFillCategoryDataset)getDataset()).getItemHyperlinks());
			break;
		case JRChart.CHART_TYPE_BUBBLE:
			chartHyperlinkProvider = new XYChartHyperlinkProvider(((JRFillXyzDataset)getDataset()).getItemHyperlinks());
			break;
		case JRChart.CHART_TYPE_SCATTER:
		case JRChart.CHART_TYPE_XYAREA:
		case JRChart.CHART_TYPE_XYLINE:
			chartHyperlinkProvider = new XYChartHyperlinkProvider(((JRFillXyDataset)getDataset()).getItemHyperlinks());
			break;
		case JRChart.CHART_TYPE_CANDLESTICK:
		case JRChart.CHART_TYPE_HIGHLOW:
			chartHyperlinkProvider = new HighLowChartHyperlinkProvider(((JRFillHighLowDataset)getDataset()).getItemHyperlinks());
			break;
		case JRChart.CHART_TYPE_MULTI_AXIS:
			//multi-axis charts are dealt with in createMultiAxisChart
			break;
		case JRChart.CHART_TYPE_PIE:
		case JRChart.CHART_TYPE_PIE3D:
			chartHyperlinkProvider = new PieChartHyperlinkProvider(((JRFillPieDataset)getDataset()).getSectionHyperlinks());
			break;
		case JRChart.CHART_TYPE_TIMESERIES:
			chartHyperlinkProvider = new TimeSeriesChartHyperlinkProvider(((JRFillTimeSeriesDataset)getDataset()).getItemHyperlinks());
			break;
		case JRChart.CHART_TYPE_XYBAR:
			switch(getDataset().getDatasetType())
			{
				case JRChartDataset.TIMESERIES_DATASET :
					chartHyperlinkProvider = new TimeSeriesChartHyperlinkProvider(((JRFillTimeSeriesDataset)getDataset()).getItemHyperlinks());
					break;
				case JRChartDataset.TIMEPERIOD_DATASET :
					chartHyperlinkProvider = new TimePeriodChartHyperlinkProvider(((JRFillTimePeriodDataset)getDataset()).getItemHyperlinks());
					break;
				case JRChartDataset.XY_DATASET :
					chartHyperlinkProvider = new XYChartHyperlinkProvider(((JRFillXyDataset)getDataset()).getItemHyperlinks());
					break;
				default:
					break;
			}
			break;
		case JRChart.CHART_TYPE_GANTT:
			chartHyperlinkProvider = new XYChartHyperlinkProvider(((JRFillGanttDataset)getDataset()).getItemHyperlinks());
			break;
		case JRChart.CHART_TYPE_METER:
		case JRChart.CHART_TYPE_THERMOMETER:
			//no item hyperlinks
			break;
		default:
			throw 
				new JRRuntimeException(
					JRBaseChart.EXCEPTION_MESSAGE_KEY_CHART_TYPE_NOT_SUPPORTED,  
					new Object[]{getChartType()} 
					);
	}

	return chartHyperlinkProvider;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:73,代码来源:JRFillChart.java


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