com.googlecode.wickedcharts.wicket6.highcharts
Class Chart

java.lang.Object
  extended by org.apache.wicket.Component
      extended by org.apache.wicket.MarkupContainer
          extended by org.apache.wicket.markup.html.WebMarkupContainer
              extended by com.googlecode.wickedcharts.wicket6.highcharts.Chart
All Implemented Interfaces:
Serializable, Iterable<org.apache.wicket.Component>, org.apache.wicket.event.IEventSink, org.apache.wicket.event.IEventSource, org.apache.wicket.IConverterLocator, org.apache.wicket.markup.html.IHeaderContributor, org.apache.wicket.request.component.IRequestableComponent, org.apache.wicket.util.IHierarchical<org.apache.wicket.Component>, org.apache.wicket.util.io.IClusterable

public class Chart
extends org.apache.wicket.markup.html.WebMarkupContainer

A simple markup container to display a chart. A chart can be provided with the following data:

Please note that due to a bug in the Highcharts javascript library, it is currently not possible to change the theme of a chart via AJAX. If you do this, only the configuration options defined in the new theme are overridden. Any configuration options defined in the old theme and not in the new theme will stay active.

Author:
Tom Hombergs (tom.hombergs@gmail.com)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER
 
Constructor Summary
Chart(String id, Options options)
           
Chart(String id, Options options, Theme theme)
           
 
Method Summary
protected  ChartBehavior createChartBehavior()
          Factory method for ChartBehaviors.
 String getJavaScriptVarName()
           
 Options getOptions()
           
 Theme getTheme()
           
 org.apache.wicket.request.resource.JavaScriptResourceReference getThemeReference()
           
 String getThemeUrl()
           
 void setOptions(Options options)
           
 void setTheme(org.apache.wicket.request.resource.JavaScriptResourceReference theme)
          Sets the theme for this chart by specifying a reference to a javascript file containing the theme.
 void setTheme(String themeUrl)
          Sets the theme for this chart by specifying a URL to a javascript file containing the theme.
 void setTheme(Theme theme)
          Sets the theme for this chart by specifying a theme class.
 void setThemeReference(org.apache.wicket.request.resource.JavaScriptResourceReference themeReference)
           
 void setThemeUrl(String themeUrl)
           
 
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebPage, getWebRequest, getWebResponse, getWebSession
 
Methods inherited from class org.apache.wicket.MarkupContainer
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
 
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Chart

public Chart(String id,
             Options options)

Chart

public Chart(String id,
             Options options,
             Theme theme)
Method Detail

getOptions

public Options getOptions()

getTheme

public Theme getTheme()

getThemeReference

public org.apache.wicket.request.resource.JavaScriptResourceReference getThemeReference()

getThemeUrl

public String getThemeUrl()

setOptions

public void setOptions(Options options)

setTheme

public void setTheme(org.apache.wicket.request.resource.JavaScriptResourceReference theme)
Sets the theme for this chart by specifying a reference to a javascript file containing the theme. The javascript file must contain the following code:
 Highcharts.setOptions(myOptions);
 
where myOptions is a JSON representation of the theme options.

A theme can only be set via one setTheme method. An IllegalStateException will be thrown if you call two setTheme methods.

Parameters:
theme - reference to a javascript file containing a theme.
See Also:
http://www.highcharts.com/demo

setTheme

public void setTheme(String themeUrl)
Sets the theme for this chart by specifying a URL to a javascript file containing the theme. The javascript file must contain the following code:
 Highcharts.setOptions(myOptions);
 
where myOptions is a JSON representation of the theme options.

A theme can only be set via one setTheme method. An IllegalStateException will be thrown if you call two setTheme methods.

Parameters:
theme - reference to a javascript file containing a theme.
See Also:
http://www.highcharts.com/demo

setTheme

public void setTheme(Theme theme)
Sets the theme for this chart by specifying a theme class.

A theme can only be set via one setTheme method. An IllegalStateException will be thrown if you call two setTheme methods.

Parameters:
theme - the theme class.

setThemeReference

public void setThemeReference(org.apache.wicket.request.resource.JavaScriptResourceReference themeReference)

setThemeUrl

public void setThemeUrl(String themeUrl)

getJavaScriptVarName

public String getJavaScriptVarName()

createChartBehavior

protected ChartBehavior createChartBehavior()
Factory method for ChartBehaviors. May be overridden, if a custom implementation of ChartBehavior is needed.



Copyright © 2013. All Rights Reserved.