org.zkoss.zul
Class Flashchart

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.Flash
              extended by org.zkoss.zul.Flashchart
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HtmlBasedComponent, Component, Scope, ComponentCtrl, Flash, Flashchart

public class Flashchart
extends Flash
implements Flashchart

The generic flash chart component. Developers set proper chart type, data model, and the src attribute to draw proper chart. The model and type must match to each other; or the result is unpredictable.

typemodel
piePieModel
barCategoryModel
lineCategoryModel
columnCategoryModel
stackbarCategoryModel
stackcolumnXYModel

Default HtmlBasedComponent.getWidth(): 400px

Default HtmlBasedComponent.getHeight(): 200px

Since:
5.0.0
Author:
Joy Lo
See Also:
Serialized Form

Nested 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
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_height, _left, _top, _width, _zclass
 
Fields inherited from class org.zkoss.zk.ui.AbstractComponent
_visible
 
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
Flashchart()
          Sets default values.
 
Method Summary
 java.lang.String getChartStyle()
          Returns the content style.
 ChartModel getModel()
          Returns the model of chart.
 java.lang.String getType()
          Returns the type of chart
 java.lang.String getXaxis()
          Returns the name of X-Axis
 java.lang.String getYaxis()
          Returns the name of Y-Axis.
protected  void renderProperties(ContentRenderer renderer)
          RenderProperties method will bind the attributes with FlashChart.js.
 void setChartStyle(java.lang.String chartStyle)
          Sets the content style of flashchart.
 void setModel(ChartModel model)
          Sets the model of chart.
 void setType(java.lang.String type)
          Sets the type of chart.
 void setXaxis(java.lang.String xAxis)
          Sets X-Axis name of chart.
 void setYaxis(java.lang.String yAxis)
          Sets Y-Axis name of chart.
 
Methods inherited from class org.zkoss.zul.Flash
getBgcolor, getContent, getQuality, getSrc, getVersion, getWmode, isAutoplay, isAutoPlay, isLoop, setAutoplay, setAutoPlay, setBgcolor, setContent, setLoop, setQuality, setSrc, setVersion, setWmode
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getDraggable, getDroppable, getHeight, getHflex, getLeft, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, newExtraCtrl, service, setClass, setDraggable, setDroppable, setFocus, setHeight, setHflex, setLeft, setSclass, setStyle, setTooltiptext, setTop, setVflex, setWidth, setZclass, setZindex, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, clone, containsVariable, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getChildren, getClientEvents, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getExtraCtrl, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, newChildren, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, unsetVariable, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.zkoss.zul.api.Flash
getBgcolor, getContent, getQuality, getSrc, getVersion, getWmode, isAutoplay, isLoop, setAutoplay, setBgcolor, setContent, setLoop, setQuality, setSrc, setVersion, setWmode
 
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex
 
Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, containsVariable, detach, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getChildren, getDefinition, getDesktop, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, setWidgetListener, setWidgetOverride, unsetVariable
 
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
 

Constructor Detail

Flashchart

public Flashchart()
Sets default values.

Method Detail

renderProperties

protected void renderProperties(ContentRenderer renderer)
                         throws java.io.IOException
RenderProperties method will bind the attributes with FlashChart.js.

Overrides:
renderProperties in class Flash
Throws:
java.io.IOException

setType

public void setType(java.lang.String type)
Sets the type of chart.

Default: "pie"

Allowed Types: pie, line, bar, column, stackbar, stackcolumn

Specified by:
setType in interface Flashchart

getType

public java.lang.String getType()
Returns the type of chart

Specified by:
getType in interface Flashchart

setModel

public void setModel(ChartModel model)
Sets the model of chart. The chart will be redrawed if setting an different model.

Only implement models which matched the allowed types

Specified by:
setModel in interface Flashchart
Parameters:
model -
See Also:
setType(String)

getModel

public ChartModel getModel()
Returns the model of chart.

Specified by:
getModel in interface Flashchart

setXaxis

public void setXaxis(java.lang.String xAxis)
Sets X-Axis name of chart. If doesn't set this attribute, then default will shows Series 2.

Default: Series 2

Only used for StackColumnChart and it only works when the chart initial.

Specified by:
setXaxis in interface Flashchart

getXaxis

public java.lang.String getXaxis()
Returns the name of X-Axis

Specified by:
getXaxis in interface Flashchart

setYaxis

public void setYaxis(java.lang.String yAxis)
Sets Y-Axis name of chart. If doesn't set this attribute, then default will shows Series 1.

Default: Series 1

Only used for StackColumnChart and it only works when the chart initial.

Specified by:
setYaxis in interface Flashchart

getYaxis

public java.lang.String getYaxis()
Returns the name of Y-Axis.

Specified by:
getYaxis in interface Flashchart

setChartStyle

public void setChartStyle(java.lang.String chartStyle)
Sets the content style of flashchart.

Default format: "Category-Attribute=Value", ex."legend-display=right"

Specified by:
setChartStyle in interface Flashchart

getChartStyle

public java.lang.String getChartStyle()
Returns the content style.

Specified by:
getChartStyle in interface Flashchart


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo