Nuclos Jasper dial gauge: DialPlot, JFreeChart, image expression, evaluation time report, BufferedImage, Graphics2D. |
Language: Deutsch · English
Dial/gauge display via an image object – JFreeChart DialPlot, evaluation time = report and label limits.
Auf dieser Seite |
A dial (gauge) cannot be shown as a standard chart but via an image object whose picture is drawn by a JFreeChart DialPlot (based on DialDemo2.java).
To output a sum over a variable:
A scriptlet/customizer class turns the value into a java.awt.Image: it builds a DialPlot with scale, needle and cap, wraps it in a JFreeChart and draws it via Graphics2D into a BufferedImage (e.g. 250×250 px):
Graphics2D g2 = image.createGraphics(); jfreechart.draw(g2, new Rectangle2D.Double(0.0, 0.0, 250, 250)); g2.dispose(); return image; |
The dial label does not support |