Package net.sf.jasperreports.charts.util
Class ChartUtil
java.lang.Object
net.sf.jasperreports.charts.util.ChartUtil
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final doubleprotected static final double -
Method Summary
Modifier and TypeMethodDescriptionorg.jfree.chart.axis.TickUnitSourcecreateIntegerTickUnits(Locale locale) org.jfree.chart.axis.TickUnitSourcecreateStandardTickUnits(Locale locale) static voiddrawChart(org.jfree.chart.JFreeChart chart, Graphics2D grx, Rectangle2D rectangle, int reportDpi) Draws a chart at the resolution of the report.getChartRenderableFactory(String renderType) static List<JRPrintImageAreaHyperlink> getImageAreaHyperlinks(org.jfree.chart.JFreeChart chart, ChartHyperlinkProvider chartHyperlinkProvider, Graphics2D grx, Rectangle2D renderingArea, double dpiScale) Collects the hyperlink areas of a chart laid out on the given area.static ChartUtilgetInstance(JasperReportsContext jasperReportsContext) static final org.jfree.chart.plot.PlotOrientationgetPlotOrientation(PlotOrientationEnum plotOrientationEnum) static final PlotOrientationEnumgetPlotOrientation(org.jfree.chart.plot.PlotOrientation jfcPlotOrientation) static final IntegergetScaleType(ScaleTypeEnum scaleTypeEnum) static final TimePeriodEnumgetTimePeriod(Class<?> timePeriodClass) static final Class<?> getTimePeriod(TimePeriodEnum timePeriod) voidsetAutoTickUnit(org.jfree.chart.axis.NumberAxis numberAxis) static Rectangle2DtoChartArea(Rectangle2D rectangle, double dpiScale) Reduces a rectangle expressed in report pixels to the point based area a chart lays out in.static floattoChartLength(float reportPixels, int reportDpi) Converts a length expressed in report pixels into the point based coordinates a chart lays out in, so that paints and shapes derived from the dimensions of the chart element line up with the chart itself.
-
Field Details
-
AUTO_TICK_UNIT_THRESHOLD
protected static final double AUTO_TICK_UNIT_THRESHOLD- See Also:
-
AUTO_TICK_UNIT_FACTOR
protected static final double AUTO_TICK_UNIT_FACTOR- See Also:
-
-
Method Details
-
getInstance
-
getImageAreaHyperlinks
public static List<JRPrintImageAreaHyperlink> getImageAreaHyperlinks(org.jfree.chart.JFreeChart chart, ChartHyperlinkProvider chartHyperlinkProvider, Graphics2D grx, Rectangle2D renderingArea, double dpiScale) Collects the hyperlink areas of a chart laid out on the given area. The areas come out in the coordinates the chart was laid out in, so they are scaled back to the pixels of the report. -
getTheme
-
drawChart
public static void drawChart(org.jfree.chart.JFreeChart chart, Graphics2D grx, Rectangle2D rectangle, int reportDpi) Draws a chart at the resolution of the report. Charts lay themselves out using fonts and strokes expressed in points, so at a resolution other than the default they are drawn onto a surface scaled accordingly, on a rectangle reduced by the same amount. -
toChartLength
public static float toChartLength(float reportPixels, int reportDpi) Converts a length expressed in report pixels into the point based coordinates a chart lays out in, so that paints and shapes derived from the dimensions of the chart element line up with the chart itself. -
toChartArea
Reduces a rectangle expressed in report pixels to the point based area a chart lays out in. -
getChartRenderableFactory
-
createIntegerTickUnits
-
createStandardTickUnits
-
setAutoTickUnit
public void setAutoTickUnit(org.jfree.chart.axis.NumberAxis numberAxis) -
getPlotOrientation
public static final org.jfree.chart.plot.PlotOrientation getPlotOrientation(PlotOrientationEnum plotOrientationEnum) -
getPlotOrientation
public static final PlotOrientationEnum getPlotOrientation(org.jfree.chart.plot.PlotOrientation jfcPlotOrientation) -
getScaleType
-
getTimePeriod
-
getTimePeriod
-