public class Fusionchart
extends org.zkoss.zk.ui.HtmlBasedComponent
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 Form| Modifier and Type | Field and Description |
|---|---|
static String |
ORIENT_HORIZONTAL |
static String |
ORIENT_VERTICAL |
| Constructor and Description |
|---|
Fusionchart() |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
AbstractChartConfig |
getChartConfig() |
String |
getDataXMLPath()
Get the url of the chart data .xml file.
|
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.
|
org.zkoss.zul.ChartModel |
getModel()
Returns the chart model associated with this chart, or null
if this chart is not associated with any chart data model.
|
String |
getOrient()
Get the chart orientation (vertical or horizontal)
|
String |
getSubTitle()
Get the chart's subtitle.
|
<T> org.zkoss.zul.ListModel<T> |
getTableModel() |
<T> GanttTableRenderer<T> |
getTableRenderer() |
TimeZone |
getTimeZone()
Returns the time zone that this Time Series Chart belongs to, or null if
the default time zone is used.
|
String |
getTitle()
Get the chart's title.
|
String |
getType()
Get the chart's type.
|
String |
getXAxis()
Get the label in xAxis.
|
String |
getYAxis()
Get the label in yAxis.
|
String |
getZclass() |
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(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
service(org.zkoss.zk.au.AuRequest request,
boolean everError) |
void |
setChartConfig(AbstractChartConfig chartConfig) |
void |
setDataXMLPath(String url)
Set the url of the chart data .xml file.
|
void |
setDateFormat(String format)
Sets the date format used by date related Chart.
|
void |
setEngine(FusionchartEngine<Fusionchart> engine)
Sets the chart engine.
|
void |
setEngine(String clsnm)
Sets the chart engine by use of a class name.
|
void |
setHeight(String h)
Override super class to prepare the int height.
|
void |
setHflex(String flex)
Overrides the method in HtmlBasedComponent, not to check using hflex and width at the same time
|
void |
setModel(org.zkoss.zul.ChartModel model)
Sets the chart model associated with this chart.
|
void |
setModel(String clsnm)
Sets the model by use of a class name.
|
void |
setOrient(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(String subTitle)
Set the chart's subtitle.
|
void |
setTableModel(org.zkoss.zul.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(TimeZone tzone)
Sets the time zone that this Time Series Chart belongs to, or null if
the default time zone is used.
|
void |
setTitle(String title)
Set the chart's title.
|
void |
setType(String type)
Set the chart's type (Chart.PIE, Chart.BAR, Chart.LINE, etc.).
|
void |
setVflex(String flex)
Overrides the method in HtmlBasedComponent, not to check using vflex and height at the same time
|
void |
setWidth(String w)
Override super class to prepare the int width.
|
void |
setXAxis(String label)
Set the label in xAxis.
|
void |
setYAxis(String label)
Set the label in yAxis.
|
protected void |
smartDrawChart()
mark a draw flag to inform that this Chart needs update.
|
addSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getPropertyAccess, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight0, setHeightDirectly, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex0, setVflexDirectly, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyaddAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerializepublic static final String ORIENT_VERTICAL
public static final String ORIENT_HORIZONTAL
public void setType(String type)
Default: pie.
public String getType()
public void setThreeD(boolean threeD)
public boolean isThreeD()
public void setTitle(String title)
title - the chart's title.public String getTitle()
public void setSubTitle(String subTitle)
subTitle - the chart's subtitle.public String getSubTitle()
public void setWidth(String w)
setWidth in class org.zkoss.zk.ui.HtmlBasedComponentpublic void setHflex(String flex)
setHflex in class org.zkoss.zk.ui.HtmlBasedComponentpublic int getIntWidth()
public void setHeight(String h)
setHeight in class org.zkoss.zk.ui.HtmlBasedComponentpublic void setVflex(String flex)
setVflex in class org.zkoss.zk.ui.HtmlBasedComponentpublic int getIntHeight()
public void setXAxis(String label)
label - label in xAxis.public String getXAxis()
public void setYAxis(String label)
label - label in yAxis.public 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(String orient)
orient - vertical or horizontal (default to vertical)public String getOrient()
public TimeZone getTimeZone()
The default time zone is determined by TimeZones.getCurrent().
public void setTimeZone(TimeZone tzone)
The default time zone is determined by TimeZones.getCurrent().
public String getDateFormat()
public void setDateFormat(String format)
format - MM/dd/yyyy or dd/MM/yyyy or yyyy/MM/dd (default to MM/dd/yyyy)public void setDataXMLPath(String url)
url - the url path for the data xml pathpublic String getDataXMLPath()
public AbstractChartConfig getChartConfig()
public void setChartConfig(AbstractChartConfig chartConfig)
public <T> GanttTableRenderer<T> getTableRenderer()
public void setTableRenderer(GanttTableRenderer<?> renderer)
public org.zkoss.zul.ChartModel getModel()
public void setModel(org.zkoss.zul.ChartModel model)
model - the chart model to associate, or null to dissociate
any previous model.org.zkoss.zk.ui.UiException - if failed to initialize with the modelpublic void setModel(String clsnm) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException
public <T> org.zkoss.zul.ListModel<T> getTableModel()
public void setTableModel(org.zkoss.zul.ListModel<?> model)
public FusionchartEngine<Fusionchart> getEngine() throws org.zkoss.zk.ui.UiException
org.zkoss.zk.ui.UiExceptionprotected FusionchartEngine<Fusionchart> newChartEngine() throws org.zkoss.zk.ui.UiException
setEngine(org.zkoss.zkmax.zul.fusionchart.FusionchartEngine<org.zkoss.zkmax.zul.Fusionchart>) 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.
org.zkoss.zk.ui.UiException - if failed to instantiate the enginepublic void setEngine(FusionchartEngine<Fusionchart> engine)
public void setEngine(String clsnm) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException
protected void smartDrawChart()
public String getZclass()
getZclass in class org.zkoss.zk.ui.HtmlBasedComponentpublic Object clone()
clone in interface org.zkoss.zk.ui.Componentclone in class org.zkoss.zk.ui.HtmlBasedComponentpublic void service(org.zkoss.zk.au.AuRequest request,
boolean everError)
service in interface org.zkoss.zk.ui.sys.ComponentCtrlservice in class org.zkoss.zk.ui.HtmlBasedComponentprotected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws IOException
renderProperties in class org.zkoss.zk.ui.HtmlBasedComponentIOExceptionpublic boolean isChildable()
isChildable in class org.zkoss.zk.ui.AbstractComponentCopyright © 2026. All rights reserved.