本文整理汇总了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();
}
示例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();
}
}
示例3: getDatasetType
@Override
public byte getDatasetType() {
return JRChartDataset.TIMEPERIOD_DATASET;
}
示例4: getDatasetType
@Override
public byte getDatasetType()
{
return JRChartDataset.TIMEPERIOD_DATASET;
}
示例5: getDatasetType
@Override
public byte getDatasetType()
{
return JRChartDataset.TIMEPERIOD_DATASET;
}
示例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;
}