public class Fusionchart extends 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 FormHtmlBasedComponent.ExtraCtrl
AbstractComponent.Children
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ORIENT_HORIZONTAL |
static java.lang.String |
ORIENT_VERTICAL |
_zclass
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
Constructor and Description |
---|
Fusionchart() |
Modifier and Type | Method and Description |
---|---|
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.
|
<T> ListModel<T> |
getTableModel() |
<T> GanttTableRenderer<T> |
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 dependencies 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 |
setHflex(java.lang.String flex)
Overrides the method in HtmlBasedComponent, not to check using hflex and width at the same time
|
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 |
setVflex(java.lang.String flex)
Overrides the method in HtmlBasedComponent, not to check using vflex and height at the same time
|
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.
|
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, setZIndexDirectly
addAnnotation, 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, 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, willSerialize
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
invalidatePartial
public static final java.lang.String ORIENT_VERTICAL
public static final java.lang.String ORIENT_HORIZONTAL
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 void setHflex(java.lang.String flex)
setHflex
in class HtmlBasedComponent
flex
- horizontal flex hint of this component.HtmlBasedComponent.setVflex(java.lang.String)
,
HtmlBasedComponent.getHflex()
public int getIntWidth()
public void setHeight(java.lang.String h)
setHeight
in class HtmlBasedComponent
public void setVflex(java.lang.String flex)
setVflex
in class HtmlBasedComponent
flex
- the vertical flex hint.HtmlBasedComponent.setHflex(java.lang.String)
,
HtmlBasedComponent.getVflex()
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<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.
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
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
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.