public class JFreeChartEngine extends java.lang.Object implements ChartEngine, java.io.Serializable
Available in ZK PE and ZK EE.
This is the JFreeChart base chart engine implementation. All chart would
support drilldown by providing Area hot spots. Each Area would callback to
ChartAreaListener
class that application developers
can do processing on each area.
Note that useful ChartModel
information is put in
Area's custom attribute Map so you can retrieve them by calling Area's
getAttribute(key) method and use them in drilldown function. Following is
the table of keys for different ChartModel.
model | key |
---|---|
PieModel | entity |
category | |
value | |
CategoryModel | entity |
series | |
category | |
value | |
XYModel | entity |
series | |
x | |
y | |
XYZModel | entity |
since 3.5.0 | series |
x | |
y | |
z | |
HiLoModel | entity |
series | |
date | |
open | |
high | |
low | |
close | |
volumn |
Following is the explanation for each key:
See also jFreeChart.
Constructor and Description |
---|
JFreeChartEngine() |
Modifier and Type | Method and Description |
---|---|
byte[] |
drawChart(java.lang.Object data)
Draw the chart and render into image format as an byte array.
|
protected java.lang.String |
getGanttTaskTooltip(java.util.Date start,
java.util.Date end,
java.lang.Number percent)
Returns data tooltiptext of the GanttTask.
|
protected boolean |
prepareJFreeChart(org.jfree.chart.JFreeChart jfchart,
Chart chart)
Developers with special needs can override this method to apply own rendering properties on the created JFreeChart.
|
protected boolean prepareJFreeChart(org.jfree.chart.JFreeChart jfchart, Chart chart)
jfchart
- the created JFreeChartchart
- the ZK chart component associated with this ChartEngine.public byte[] drawChart(java.lang.Object data)
ChartEngine
drawChart
in interface ChartEngine
data
- the data used in drawing a chart; depends on implementation.protected java.lang.String getGanttTaskTooltip(java.util.Date start, java.util.Date end, java.lang.Number percent)
start
- the starting dateend
- the ending datepercent
- the complete percentageCopyright © 2005-2018 Potix Corporation. All Rights Reserved.