|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.ui.AbstractComponent org.zkoss.zk.ui.HtmlBasedComponent org.zkoss.zkmax.zul.Fusionchart
public class Fusionchart
The Fusionchart component. Developers set proper chart type, data model, and the threeD (3D) attribute to draw proper chart.
The model and type must match to each other; or the result is unpredictable. The 3D chart is not supported on all chart type.
type | model | VERTICAL 3D | Horizontal 3D |
---|---|---|---|
area | CategoryModel or XYModel | No | No |
bar | CategoryModel | Yes | No |
gantt | GanttModel | No | No |
line | CategoryModel or XYModel | Yes | |
pie | PieModel | Yes | Yes |
funnel | SingleValueCategoryModel | No | No |
stacked_bar | CategoryModel | Yes | Yes |
stacked_area | CategoryModel or XYModel | No | No |
ChartModel
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
HtmlBasedComponent.ExtraCtrl |
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
AbstractComponent.Children |
Field Summary | |
---|---|
static java.lang.String |
ORIENT_HORIZONTAL
|
static java.lang.String |
ORIENT_VERTICAL
|
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
_zclass |
Fields inherited from interface org.zkoss.zk.ui.Component |
---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl |
---|
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE |
Constructor Summary | |
---|---|
Fusionchart()
|
Method Summary | ||
---|---|---|
java.lang.Object |
clone()
Clones the component. |
|
AbstractChartConfig |
getChartConfig()
|
|
java.lang.String |
getDataXMLPath()
Get the url of the chart data .xml file. |
|
java.lang.String |
getDateFormat()
Returns the date format used by date related Chart. |
|
FusionchartEngine<Fusionchart> |
getEngine()
|
|
int |
getIntHeight()
Get the chart int width in pixel; to be used by the derived subclass. |
|
int |
getIntWidth()
Get the chart int width in pixel; to be used by the derived subclass. |
|
ChartModel |
getModel()
Returns the chart model associated with this chart, or null if this chart is not associated with any chart data model. |
|
java.lang.String |
getOrient()
Get the chart orientation (vertical or horizontal) |
|
java.lang.String |
getSubTitle()
Get the chart's subtitle. |
|
|
getTableModel()
|
|
|
getTableRenderer()
|
|
java.util.TimeZone |
getTimeZone()
Returns the time zone that this Time Series Chart belongs to, or null if the default time zone is used. |
|
java.lang.String |
getTitle()
Get the chart's title. |
|
java.lang.String |
getType()
Get the chart's type. |
|
java.lang.String |
getXAxis()
Get the label in xAxis. |
|
java.lang.String |
getYAxis()
Get the label in yAxis. |
|
java.lang.String |
getZclass()
Returns the ZK Cascading Style class(es) for this component. |
|
void |
invalidate()
Invalidates this component by setting the dirty flag such that it will be redraw the whole content of this component and its dependences later. |
|
boolean |
isChildable()
Not childable. |
|
boolean |
isShowLegend()
Check whether show the legend of the chart. |
|
boolean |
isShowTooltiptext()
Check whether show the tooltiptext. |
|
boolean |
isThreeD()
Whether a 3d chart. |
|
protected FusionchartEngine<Fusionchart> |
newChartEngine()
Instantiates the default chart engine. |
|
protected void |
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing tags and children. |
|
void |
service(AuRequest request,
boolean everError)
Processes an AU request. |
|
void |
setChartConfig(AbstractChartConfig chartConfig)
|
|
void |
setDataXMLPath(java.lang.String url)
Set the url of the chart data .xml file. |
|
void |
setDateFormat(java.lang.String format)
Sets the date format used by date related Chart. |
|
void |
setEngine(FusionchartEngine<Fusionchart> engine)
Sets the chart engine. |
|
void |
setEngine(java.lang.String clsnm)
Sets the chart engine by use of a class name. |
|
void |
setHeight(java.lang.String h)
Override super class to prepare the int height. |
|
void |
setModel(ChartModel model)
Sets the chart model associated with this chart. |
|
void |
setModel(java.lang.String clsnm)
Sets the model by use of a class name. |
|
void |
setOrient(java.lang.String orient)
Set the chart orientation. |
|
void |
setShowLegend(boolean showLegend)
whether show the chart's legend. |
|
void |
setShowTooltiptext(boolean showTooltiptext)
whether show the chart's tooltip. |
|
void |
setSubTitle(java.lang.String subTitle)
Set the chart's subtitle. |
|
void |
setTableModel(ListModel<?> model)
|
|
void |
setTableRenderer(GanttTableRenderer<?> renderer)
|
|
void |
setThreeD(boolean threeD)
Set true to show three dimensional graph (If a type of chart got no 3d peer, this is ignored). |
|
void |
setTimeZone(java.util.TimeZone tzone)
Sets the time zone that this Time Series Chart belongs to, or null if the default time zone is used. |
|
void |
setTitle(java.lang.String title)
Set the chart's title. |
|
void |
setType(java.lang.String type)
Set the chart's type (Chart.PIE, Chart.BAR, Chart.LINE, etc.). |
|
void |
setWidth(java.lang.String w)
Override super class to prepare the int width. |
|
void |
setXAxis(java.lang.String label)
Set the label in xAxis. |
|
void |
setYAxis(java.lang.String label)
Set the label in yAxis. |
|
protected void |
smartDrawChart()
mark a draw flag to inform that this Chart needs update. |
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, setAction, setClass, setDraggable, setDroppable, setFocus, setHeightDirectly, setHflex, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ORIENT_VERTICAL
public static final java.lang.String ORIENT_HORIZONTAL
Constructor Detail |
---|
public Fusionchart()
Method Detail |
---|
public void setType(java.lang.String type)
Default: pie.
public java.lang.String getType()
public void setThreeD(boolean threeD)
public boolean isThreeD()
public void setTitle(java.lang.String title)
title
- the chart's title.public java.lang.String getTitle()
public void setSubTitle(java.lang.String subTitle)
subTitle
- the chart's subtitle.public java.lang.String getSubTitle()
public void setWidth(java.lang.String w)
setWidth
in class HtmlBasedComponent
HtmlBasedComponent.setWidthDirectly(java.lang.String)
,
AbstractComponent.disableClientUpdate(boolean)
public int getIntWidth()
public void setHeight(java.lang.String h)
setHeight
in class HtmlBasedComponent
public int getIntHeight()
public void setXAxis(java.lang.String label)
label
- label in xAxis.public java.lang.String getXAxis()
public void setYAxis(java.lang.String label)
label
- label in yAxis.public java.lang.String getYAxis()
public void setShowLegend(boolean showLegend)
showLegend
- true if want to show the legend (default to true).public boolean isShowLegend()
public void setShowTooltiptext(boolean showTooltiptext)
showTooltiptext
- true if want to pop the tooltiptext (default to true).public boolean isShowTooltiptext()
public void setOrient(java.lang.String orient)
orient
- vertical or horizontal (default to vertical)public java.lang.String getOrient()
public java.util.TimeZone getTimeZone()
The default time zone is determined by TimeZones.getCurrent()
.
public void setTimeZone(java.util.TimeZone tzone)
The default time zone is determined by TimeZones.getCurrent()
.
public java.lang.String getDateFormat()
public void setDateFormat(java.lang.String format)
format
- MM/dd/yyyy or dd/MM/yyyy or yyyy/MM/dd (default to MM/dd/yyyy)public void setDataXMLPath(java.lang.String url)
url
- the url path for the data xml pathpublic java.lang.String getDataXMLPath()
public AbstractChartConfig getChartConfig()
public void setChartConfig(AbstractChartConfig chartConfig)
public <T> GanttTableRenderer<T> getTableRenderer()
public void setTableRenderer(GanttTableRenderer<?> renderer)
public ChartModel getModel()
public void setModel(ChartModel model)
model
- the chart model to associate, or null to dissociate
any previous model.
UiException
- if failed to initialize with the modelpublic void setModel(java.lang.String clsnm) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.reflect.InvocationTargetException
public <T> ListModel<T> getTableModel()
public void setTableModel(ListModel<?> model)
public FusionchartEngine<Fusionchart> getEngine() throws UiException
UiException
protected FusionchartEngine<Fusionchart> newChartEngine() throws UiException
setEngine(org.zkoss.zkmax.zul.fusionchart.FusionchartEngine)
is not called with non-null
engine.
By default, it looks up the library property called
org.zkoss.zul.chart.engine.class.
If found, the value is assumed to be
the class name of the chart engine (it must implement
FusionchartEngine
).
If not found, UiException
is thrown.
Derived class might override this method to provide your own default class.
UiException
- if failed to instantiate the enginepublic void setEngine(FusionchartEngine<Fusionchart> engine)
public void setEngine(java.lang.String clsnm) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.reflect.InvocationTargetException
protected void smartDrawChart()
public java.lang.String getZclass()
HtmlBasedComponent
AbstractComponent.getMold()
).
Default: null (the default value depends on element).
HtmlBasedComponent.setZclass(java.lang.String)
) will completely replace the default style
of a component. In other words, the default style of a component
is associated with the default value of HtmlBasedComponent.getZclass()
.
Once it is changed, the default style won't be applied at all.
If you want to perform small adjustments, use HtmlBasedComponent.setSclass(java.lang.String)
instead.
getZclass
in class HtmlBasedComponent
HtmlBasedComponent.getSclass()
public java.lang.Object clone()
Component
clone
in interface Component
clone
in class HtmlBasedComponent
public void service(AuRequest request, boolean everError)
HtmlBasedComponent
Default: it handles onClick, onDoubleClick, onRightClick onMove, onSize, onZIndex.
service
in interface ComponentCtrl
service
in class HtmlBasedComponent
everError
- whether any error ever occurred before
processing this request.AbstractComponent.setAuService(org.zkoss.zk.au.AuService)
protected void renderProperties(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponent
See also ZK Client-side Reference: Property Rendering
renderProperties
in class HtmlBasedComponent
java.io.IOException
public void invalidate()
Component
If the application is totally controlled by the server side (i.e., you don't write client codes), you rarely need to access this method.
It can be called only in the request-processing and event-processing phases. However, it is NOT allowed in the rendering phase.
invalidate
in interface Component
invalidate
in class AbstractComponent
public boolean isChildable()
isChildable
in class AbstractComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |