Package net.sf.jasperreports.charts.util
Class ChartsApiWriter
java.lang.Object
net.sf.jasperreports.charts.util.ChartsApiWriter
- All Implemented Interfaces:
ChartVisitor
A writer that generates the Java code required to produce a given report template programmatically, using the JasperReports API.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvisitChart(JRChart chart) voidwriteAreaChart(JRChart chart, String chartName) voidwriteAxisFormat(String indent, JRFont axisLabelFont, Color axisLabelColor, JRFont axisTickLabelFont, Color axisTickLabelColor, String axisTickLabelMask, Boolean axisVerticalTickLabels, Color axisLineColor, String parentName, String axisNameSuffix, boolean isToSet) Writes out the axis format block for a chart axis.voidwriteBar3DChart(JRChart chart, String chartName) Deprecated.To be removed.voidwriteBar3DPlot(JRBar3DPlot plot, String chartName) Deprecated.To be removed.voidwriteBarChart(JRChart chart, String chartName) voidwriteBubbleChart(JRChart chart, String chartName) voidwriteCandlestickChart(JRChart chart, String chartName) voidwriteCategoryAxisFormat(String indent, JRFont axisLabelFont, Color axisLabelColor, JRFont axisTickLabelFont, Color axisTickLabelColor, String axisTickLabelMask, Boolean axisVerticalTickLabels, Double labelRotation, Color axisLineColor, String parentName) Writes out the category axis format block.voidwriteChartTag(JRChart chart, String chartName) voidwriteDataRange(JRDataRange dataRange, String parentName, String dataRangeSuffix) Writes a data range block to the output stream.voidwriteGanttChart(JRChart chart, String chartName) voidwriteHighLowChart(JRChart chart, String chartName) voidwriteHighLowDataset(JRHighLowDataset dataset, String parentName, String datasetNameSuffix) voidwriteItemLabel(JRItemLabel itemLabel, String parentName, String itemLabelSuffix) Writes the description of how to display item labels in a category plot.voidwriteLineChart(JRChart chart, String chartName) voidwriteMeterChart(JRChart chart, String chartName) Writes the definition of a meter chart to the output stream.voidwriteMultiAxisChart(JRChart chart, String chartName) Writes the definition of a multiple axis chart to the output stream.voidwritePie3DChart(JRChart chart, String chartName) Deprecated.To be removed.voidwritePieChart(JRChart chart, String chartName) voidwritePieDataset(JRPieDataset dataset, String parentName, String datasetNameSuffix) voidwriteScatterChart(JRChart chart, String chartName) voidwriteStackedAreaChart(JRChart chart, String chartName) voidwriteStackedBar3DChart(JRChart chart, String chartName) Deprecated.To be removed.voidwriteStackedBarChart(JRChart chart, String chartName) voidwriteThermometerChart(JRChart chart, String chartName) Writes the description of a thermometer chart to the output stream.voidwriteTimeSeriesChart(JRChart chart, String chartName) voidwriteValueDataset(JRValueDataset dataset, String parentName, String datasetNameSuffix) Writes the description of a value dataset to the output stream.voidwriteValueDisplay(JRValueDisplay valueDisplay, String parentName) Writes the description of how to display a value in a valueDataset.voidwriteXyAreaChart(JRChart chart, String chartName) voidwriteXyBarChart(JRChart chart, String chartName) voidwriteXyLineChart(JRChart chart, String chartName)
-
Constructor Details
-
ChartsApiWriter
-
-
Method Details
-
visitChart
- Specified by:
visitChartin interfaceChartVisitor
-
writePieDataset
-
writeValueDataset
Writes the description of a value dataset to the output stream.- Parameters:
dataset- the value dataset to persist
-
writeValueDisplay
Writes the description of how to display a value in a valueDataset.- Parameters:
valueDisplay- the description to save
-
writeItemLabel
Writes the description of how to display item labels in a category plot.- Parameters:
itemLabel- the description to save
-
writeDataRange
Writes a data range block to the output stream.- Parameters:
dataRange- the range to write
-
writePieChart
-
writePie3DChart
Deprecated.To be removed. -
writeCategoryAxisFormat
public void writeCategoryAxisFormat(String indent, JRFont axisLabelFont, Color axisLabelColor, JRFont axisTickLabelFont, Color axisTickLabelColor, String axisTickLabelMask, Boolean axisVerticalTickLabels, Double labelRotation, Color axisLineColor, String parentName) Writes out the category axis format block.- Parameters:
axisLabelFont- font to use for the axis labelaxisLabelColor- color to use for the axis labelaxisTickLabelFont- font to use for the label of each tick markaxisTickLabelColor- color to use for the label of each tick markaxisTickLabelMask- formatting mask to use for the label of each tick markaxisVerticalTickLabels- flag to render tick labels at 90 degreeslabelRotation- label rotation angleaxisLineColor- the color to use for the axis line and any tick marks
-
writeAxisFormat
public void writeAxisFormat(String indent, JRFont axisLabelFont, Color axisLabelColor, JRFont axisTickLabelFont, Color axisTickLabelColor, String axisTickLabelMask, Boolean axisVerticalTickLabels, Color axisLineColor, String parentName, String axisNameSuffix, boolean isToSet) Writes out the axis format block for a chart axis.- Parameters:
axisLabelFont- font to use for the axis labelaxisLabelColor- color to use for the axis labelaxisTickLabelFont- font to use for the label of each tick markaxisTickLabelColor- color to use for the label of each tick markaxisTickLabelMask- formatting mask to use for the label of each tick markaxisVerticalTickLabels- flag to render tick labels at 90 degreesaxisLineColor- the color to use for the axis line and any tick marks
-
writeBar3DPlot
Deprecated.To be removed. -
writeBarChart
-
writeBar3DChart
Deprecated.To be removed. -
writeBubbleChart
-
writeStackedBarChart
-
writeStackedBar3DChart
Deprecated.To be removed. -
writeLineChart
-
writeTimeSeriesChart
-
writeHighLowDataset
public void writeHighLowDataset(JRHighLowDataset dataset, String parentName, String datasetNameSuffix) -
writeHighLowChart
-
writeGanttChart
-
writeCandlestickChart
-
writeAreaChart
-
writeScatterChart
-
writeXyAreaChart
-
writeXyBarChart
-
writeXyLineChart
-
writeMeterChart
Writes the definition of a meter chart to the output stream.- Parameters:
chart- the meter chart to write
-
writeThermometerChart
Writes the description of a thermometer chart to the output stream.- Parameters:
chart- the thermometer chart to write
-
writeMultiAxisChart
Writes the definition of a multiple axis chart to the output stream.- Parameters:
chart- the multiple axis chart to write
-
writeStackedAreaChart
-
writeChartTag
-