Class Charts
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.chart.Charts
-
- All Implemented Interfaces:
Serializable
,Cloneable
,ChartsApi
,org.zkoss.zk.ui.Component
,org.zkoss.zk.ui.ext.Scope
,org.zkoss.zk.ui.sys.ComponentCtrl
public class Charts extends org.zkoss.zk.ui.AbstractComponent implements ChartsApi
Charts is a ZK component that wraps the Highcharts.com charting library which is written in pure HTML5/JavaScript, offering intuitive, interactive charts to your website or web application. Charts component currently supports arcdiagram, area, arearange, areaspline, areasplinerange, bar, bellcurve, boxplot, bubble, bullet, column, columnpyramid, columnrange, cylinder, dependencywheel, dumbbell, errorbar, funnel (funnel3d), gauge, heatmap, histogram, item, line, lollipop, networkgraph, organization, packedbubble, pareto, pie, polygon, pyramid (pyramid3d), sankey, scatter (scatter3d), solidgauge, spline, streamgraph. sunburst, tilemap, timeline, treegraph, treemap, variablepie, variwide, vector, venn, windbarb, wordcloud, waterfall, and xrange chart types.Model supports:
- CategoryModel: line, area, bar, column, columnpyramid, areaspline, waterfall, spline, streamgraph, bullet, cylinder
- SingleValueCategoryModel: pie, pyramid (pyramid3d), funnel (funnel3d), and lollipop
- DialModel: gauge
- XYModel: line, area, bar, column, columnpyramid, areaspline, scatter, bubble, waterfall, spline, columnrange, errorbar, polygon, streamgraph, bullet, cylinder, windbarb
- XYZModel: bubble, arearange, areasplinerange, heatmap, scatter3d, variwide
- BoxPlotModel: boxplot
- WordCloudModel: wordcloud
- FromToModel: networkgraph, organization
- FromToWeightModel: networkgraph, organization, sankey, dependencywheel, and arcdiagram
- LowModel: lollipop
- LowHighModel: dumbbell
- Author:
- jumperchen, RaymondChao
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_zclass
The ZK CSS class.static String
ARC_DIAGRAM
Chart type: arcdiagramstatic String
AREA
Chart type: areastatic String
AREA_RANGE
Chart type: area rangestatic String
AREA_SPLINE
Chart type: area splinestatic String
AREA_SPLINE_RANGE
Chart type: area spline rangestatic String
BAR
Chart type: barstatic String
BELLCURVE
Chart type: bell curvestatic String
BOX_PLOT
Chart type: boxplotstatic String
BUBBLE
Chart type: bubblestatic String
COLUMN
Chart type: columnstatic String
COLUMN_PYRAMID
Chart type: column pyramidstatic String
COLUMN_RANGE
Chart type: column rangestatic String
CYLINDER
Chart type: cylinderstatic String
DEPENDENCYWHEEL
Chart type: dependency wheelstatic String
DUMBBELL
Chart type: dumbbellstatic String
ERROR_BAR
Chart type: error barstatic String
FUNNEL
Chart type: funnelstatic String
FUNNEL3D
Chart type: funnel 3dstatic String
GAUGE
Chart type: gaugestatic String
HEATMAP
Chart type: heat mapstatic String
HISTOGRAM
Chart type: histogramstatic String
ITEM
Chart type: itemstatic String
LINE
Chart type: linestatic String
LOLLIPOP
Chart type: lollipopstatic String
NETWOKRGRAPH
Chart type: network graphstatic String
ORGANIZATION
Chart type: organizationstatic String
PACKEDBUBBLE
Chart type: packed bubblestatic String
PARETO
Chart type: paretostatic String
PIE
Chart type: piestatic String
POLAR
Deprecated.since 3.0.2.static String
POLYGON
Chart type: polygonstatic String
PYRAMID
Chart type: pyramidstatic String
PYRAMID3D
Chart type: pyramid3dstatic String
SANKEY
Chart type: sankeystatic String
SCATTER
Chart type: scatterstatic String
SCATTER3D
Chart type: scatter3dstatic String
SERIES
Chart type: seriesstatic String
SOLID_GAUGE
Chart type: solid gaugestatic String
SPLINE
Chart type: splinestatic String
STREAMGRAPH
Chart type: stream graphstatic String
SUNBURST
Chart type: sunburststatic String
TILEMAP
Chart type: tilemapstatic String
TIMELINE
Chart type: timelinestatic String
TREEGRAPH
Chart type: treegraphstatic String
TREEMAP
Chart type: tree mapstatic String
VARIABLEPIE
Chart type: variable piestatic String
VARIWIDE
Chart type: variwidestatic String
VECTOR
Chart type: vectorstatic String
VENN
Chart type: vennstatic String
WATERFALL
Chart type: waterfallstatic String
WINDBARB
Chart type: wind barbstatic String
WORDCLOUD
Chart type: word cloudstatic String
XRANGE
Chart type: xrange
-
Constructor Summary
Constructors Constructor Description Charts()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addAnnotation(Annotation annotation)
Add an annotation to the chart after render time.void
addAxis(Axis axis)
Add an axis to the chart after render time.void
addEvent(String name, org.zkoss.json.JavaScriptValue event)
Sets a client side event for the chart.void
addSeries(Series series)
Add a series to the chart after render time.void
addSeriesAsDrilldown(Point point, Series series)
Add a series to the chart as drilldown from a specific point in the parent series.void
clearPointSelection()
Clears the selected points in the chart.Accessibility
getAccessibility()
Returns options for configuring accessibility for the chart.Annotation
getAnnotation()
Returns the Annotation options, if any.Annotation
getAnnotation(int index)
Returns the Annotation options from the given index, if any.int
getAnnotationSize()
Returns the size of annotationsColor
getBackgroundColor()
Returns the background color for the outer chart area.Color
getBorderColor()
Returns the color of the outer chart border.Object
getBorderRadius()
Returns the corner radius of the outer chart border.Number
getBorderWidth()
Returns the pixel width of the outer chart border.Caption
getCaption()
Returns the Caption options, if any.Chart
getChart()
Returns the Chart options, if any.String
getClassName()
Returns a CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.ColorAxis
getColorAxis()
Returns the ColorAxis options, if any.ColorAxis
getColorAxis(int index)
Returns the ColorAxis options from the given index, if any.List<Color>
getColors()
Returns the default colors for the chart's series.Credits
getCredits()
Returns the Credits options, if any.String
getCtrlKeys()
Returns what keystrokes to intercept.Data
getData()
Returns the data object.Drilldown
getDrilldown()
Returns the drilldown object.Map<String,org.zkoss.json.JavaScriptValue>
getEventsMap()
Returns a map of client side event listeners for the chart.Exporting
getExporting()
Returns the Exporting options, if any.Number
getHeight()
Returns an explicit height for the chart.String
getHflex()
Returns horizontal flex hint of this chart.Labels
getLabels()
Returns the labels optionsLang
getLang()
Returns the labels optionsLegend
getLegend()
Returns the Legend options, if any.Loading
getLoading()
Returns the Loading options, if any.Number[]
getMargin()
Returns the margin between the outer edge of the chart and the plot area.Number
getMarginBottom()
Returns the margin between the bottom outer edge of the chart and the plot area.Number
getMarginLeft()
Returns the margin between the left outer edge of the chart and the plot area.Number
getMarginRight()
Returns the margin between the right outer edge of the chart and the plot area.Number
getMarginTop()
Returns the margin between the top outer edge of the chart and the plot area.ChartsModel
getModel()
Returns the chart model associated with this chart, or null if this chart is not associated with any chart data model.Navigation
getNavigation()
Returns the navigation optionsNoData
getNoData()
Returns the no-data optionsOptions
getOptions()
Returns the global options for all Charts.Options3D
getOptions3D()
Returns the options to render charts in 3 dimensions.Pane
getPane()
Returns the pane at the index 0Pane
getPane(int index)
Returns the pane from the given indexint
getPaneSize()
Returns the size of the pane listString
getPanKey()
Returns setting a key to switch between zooming and panning.ParallelAxes
getParallelAxes()
Returns common options for all yAxes rendered in a parallel coordinates plot, if any.String
getPinchType()
Returns equivalent togetZoomType()
, but for multitouch gestures only.Color
getPlotBackgroundColor()
Returns the background color for the plot area.String
getPlotBackgroundImage()
Returns the URL for an image to use as the plot background.Color
getPlotBorderColor()
Returns the color of the inner chart or plot area border.Number
getPlotBorderWidth()
Returns the pixel width of the plot area border.PlotData
getPlotData()
Returns the plot data which is a JSON object to collect all chart's options for Charts JS.PlotOptions
getPlotOptions()
Returns the plotOptions option, if any.ResetZoomButton
getResetZoomButton()
Returns the button that appears after a selection zoom, allowing the user to reset zoom.Responsive
getResponsive()
Returns a set of rules to apply for different screen or chart sizes.ScrollablePlotArea
getScrollablePlotArea()
Returns the options for a scrollable plot area.Set<Point>
getSelectedPoints()
Returns a readonly set of all currently selected points in the chart.Color
getSelectionMarkerFill()
Returns the background color of the marker square when selecting (zooming in on) an area of the chart.Series
getSeries()
Returns the Series options, if any.Series
getSeries(int index)
Returns the Series options from the given index, if any.int
getSeriesSize()
Returns the size of seriesSonification
getSonification()
Returns the sonification options, if any.Number[]
getSpacing()
Returns the distance between the outer edge of the chart and the content, like title, legend, axis title or labels.Number
getSpacingBottom()
Returns the space between the bottom edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).Number
getSpacingLeft()
Returns the space between the left edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).Number
getSpacingRight()
Returns the space between the right edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).Number
getSpacingTop()
Returns the space between the top edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).<K,V>
Map<K,V>getStyle()
Returns additional CSS styles to apply inline to the containerdiv
.Subtitle
getSubtitle()
Returns the Subtitle options, if any.Theme
getTheme()
Returns the global theme for all Charts.Title
getTitle()
Returns the Title options, if any.Tooltip
getTooltip()
Returns the Tooltip options, if any.String
getType()
Get the chart's type.String
getVflex()
Returns vertical flex hint of this chart.Number
getWidth()
Returns an explicit width for the chart.XAxis
getXAxis()
Returns the XAxis options, if any.XAxis
getXAxis(int index)
Returns the XAxis options from the given index, if any.int
getXAxisSize()
Returns the size of xAxisYAxis
getYAxis()
Returns the YAxis options, if any.YAxis
getYAxis(int index)
Returns the YAxis options from the given index, if any.int
getyAxisSize()
Deprecated.As of release 10.2.1.0, usinggetYAxisSize()
instead.int
getYAxisSize()
Returns the size of yAxisZAxis
getZAxis()
Returns the ZAxis options, if any.ZAxis
getZAxis(int index)
Returns the ZAxis options from the given index, if any.int
getzAxisSize()
Returns the size of zAxisString
getZclass()
The default zclass is "z-charts"String
getZoomType()
Returns decides in what dimentions the user can zoom by dragging the mouse.void
hideLoading()
Hides the loading dim the chart'ts plot area after rendering time.void
invalidate()
boolean
isAlignTicks()
Returns when using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks.boolean
isAnimation()
Returns whether enable the animationboolean
isEnableZoomSelection()
Returns whether selection event will zoom the chart to the selected area.boolean
isIgnoreHiddenSeries()
Returns if true, the axes will scale to the remaining visible series once one series is hidden.boolean
isInverted()
Returns whether to invert the axes so that the x axis is vertical and y axis is horizontal.boolean
isPanning()
Returns if allow panning in a chart.boolean
isParallelCoordinates()
Returns a flag to render charts as a parallel coordinates plot.boolean
isPlotShadow()
Returns whether to apply a drop shadow to the plot area.boolean
isPolar()
Returns whether transforms into the polar coordinate systemboolean
isReflow()
Returns whether to reflow the chart to fit the width of the container div on resizing the window.boolean
isRendered()
Returns whether the component has been rendered to client side.boolean
isShadow()
Returns whether to apply a drop shadow to the outer chart area.boolean
isShowAxes()
Returns whether to show the axes initially.boolean
isStyledMode()
Returns whether to apply styled mode.void
onSyncModel()
void
print()
Clears away other elements in the page and prints the chart as it is displayed.protected void
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
void
selectPoint(Point selPoint, boolean accumulate)
void
service(org.zkoss.zk.au.AuRequest request, boolean everError)
void
setAccessibility(Accessibility accessibility)
Sets options for configuring accessibility for the chart.void
setAlignTicks(boolean alignTicks)
Sets when using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks.void
setAnimation(boolean animation)
Animation can be disabled throughout the chart by setting it to false here.void
setBackgroundColor(String backgroundColor)
Sets the background color for the outer chart area.void
setBackgroundColor(Color color)
Sets the background gradient for the outer chart area.void
setBackgroundColor(LinearGradient gradient)
Sets the background gradient for the outer chart area.void
setBackgroundColor(RadialGradient gradient)
Sets the background gradient for the outer chart area.void
setBorderColor(String borderColor)
Sets the color of the outer chart border.void
setBorderColor(Color borderColor)
Sets the color of the outer chart border.void
setBorderColor(LinearGradient borderColor)
Sets the color of the outer chart border.void
setBorderColor(RadialGradient borderColor)
Sets the color of the outer chart border.void
setBorderRadius(Number borderRadius)
Sets the corner radius of the outer chart border.void
setBorderWidth(Number borderWidth)
Sets the pixel width of the outer chart border.void
setCaption(String caption)
Sets the chart caption.void
setCaption(Caption caption)
Sets the Caption option.void
setChart(Chart chart)
Sets the Chart optionsvoid
setClassName(String className)
Sets a CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.void
setColors(String... source)
Sets the default colors for the chart's series.void
setColors(List<Color> colors)
Sets the default colors for the chart's series.void
setCredits(Credits credits)
Sets the Credits optionsvoid
setCtrlKeys(String ctrlKeys)
Sets what keystrokes to intercept.void
setDateFormat(String format, Number time, boolean capitalize)
Sets the formats a JavaScript date timestamp (milliseconds since Jan 1st 1970) into a human readable date string.void
setEnableZoomSelection(boolean enableZoomSelection)
Sets whether selection event will zoom the chart to the selected area.void
setEvents(Map<String,org.zkoss.json.JavaScriptValue> events)
Sets a map of client side event listeners for the chart.void
setExporting(Exporting exporting)
Sets the Exporting options.void
setHeight(Number height)
Sets an explicit height for the chart.void
setHeight(String height)
Sets an explicit height for the chart.void
setHflex(String flex)
Sets horizontal flex hint of this chart.void
setIgnoreHiddenSeries(boolean ignoreHiddenSeries)
Sets to ignore the hidden series, if true, the axes will scale to the remaining visible series once one series is hidden.void
setInverted(boolean inverted)
Sets whether to invert the axes so that the x axis is vertical and y axis is horizontal.void
setLabels(Labels labels)
Sets the labels optionsvoid
setLang(Lang lang)
Sets the labels optionsvoid
setLegend(Legend legend)
Sets the Legend optionsvoid
setMargin(Number margin)
Sets the margin between the outer edge of the chart and the plot area.void
setMargin(Number[] margin)
Sets the margin between the outer edge of the chart and the plot area.void
setMargin(String margins)
Sets the margin between the outer edge of the chart and the plot area.void
setMarginBottom(Number marginBottom)
Sets the margin between the bottom outer edge of the chart and the plot area.void
setMarginLeft(Number marginLeft)
Sets the margin between the left outer edge of the chart and the plot area.void
setMarginRight(Number marginRight)
Sets the margin between the right outer edge of the chart and the plot area.void
setMarginTop(Number marginTop)
Sets the margin between the top outer edge of the chart and the plot area.void
setModel(ChartsModel model)
Sets the chart model associated with this chart.void
setModel(org.zkoss.zul.ChartModel model)
void
setNavigation(Navigation navigation)
Sets the navigation optionsvoid
setNoData(NoData noData)
Sets the no-data optionsvoid
setNumberFormat(Number number, Number decimals, String decimalPoint, String thousandsSep)
Formats a JavaScript number with grouped thousands, a fixed amount of decimals and an optional decimal point.void
setOptions(Options options)
Sets the global options for all Charts in the same browser page.void
setOptions3D(Options3D options3D)
Sets the options to render charts in 3 dimensions.void
setPanKey(String panKey)
Sets setting a key to switch between zooming and panning.void
setPanning(boolean panning)
Sets if allow panning in a chart.void
setParallelAxes(ParallelAxes parallelAxes)
Sets common options for all yAxes rendered in a parallel coordinates plot.void
setParallelCoordinates(boolean parallelCoordinates)
Sets a flag to render charts as a parallel coordinates plot.void
setPinchType(String pinchType)
Sets equivalent tosetZoomType(String)
, but for multitouch gestures only.void
setPlotBackgroundColor(String plotBackgroundColor)
Sets the background color for the plot area.void
setPlotBackgroundColor(Color plotBackgroundColor)
Sets the background color for the plot area.void
setPlotBackgroundColor(LinearGradient plotBackgroundColor)
Sets the background color for the plot area.void
setPlotBackgroundColor(RadialGradient plotBackgroundColor)
Sets the background color for the plot area.void
setPlotBackgroundImage(String plotBackgroundImage)
Sets the URL for an image to use as the plot background.void
setPlotBorderColor(String plotBorderColor)
Sets the color of the inner chart or plot area border.void
setPlotBorderColor(Color plotBorderColor)
Sets the color of the inner chart or plot area border.void
setPlotBorderColor(LinearGradient plotBorderColor)
Sets the color of the inner chart or plot area border.void
setPlotBorderColor(RadialGradient plotBorderColor)
Sets the color of the inner chart or plot area border.void
setPlotBorderWidth(Number plotBorderWidth)
Sets the pixel width of the plot area border.void
setPlotOptions(PlotOptions plotOptions)
Sets the plotOptions optionsvoid
setPlotShadow(boolean plotShadow)
Sets whether to apply a drop shadow to the plot area.void
setPolar(boolean polar)
Sets to true to enable the cartesian charts like line, spline, area and column are transformed into the polar coordinate system.void
setReflow(boolean reflow)
Sets whether to reflow the chart to fit the width of the container div on resizing the window.void
setResetZoomButton(ResetZoomButton resetZoomButton)
Sets the button that appears after a selection zoom, allowing the user to reset zoom.void
setResponsive(Responsive responsive)
Sets a set of rules to apply for different screen or chart sizes.void
setScrollablePlotArea(ScrollablePlotArea scrollablePlotArea)
Sets the options for a scrollable plot area.void
setSelectionMarkerFill(String selectionMarkerFill)
Sets the background color of the marker square when selecting (zooming in on) an area of the chart.void
setSelectionMarkerFill(Color selectionMarkerFill)
Sets the background color of the marker square when selecting (zooming in on) an area of the chart.void
setSelectionMarkerFill(LinearGradient selectionMarkerFill)
Sets the background color of the marker square when selecting (zooming in on) an area of the chart.void
setSelectionMarkerFill(RadialGradient selectionMarkerFill)
Sets the background color of the marker square when selecting (zooming in on) an area of the chart.void
setShadow(boolean shadow)
Sets whether to apply a drop shadow to the outer chart area.void
setShowAxes(boolean showAxes)
Sets whether to show the axes initially.void
setSonification(Sonification sonification)
Sets the sonification optionsvoid
setSpacing(Number[] spacing)
Sets the distance between the outer edge of the chart and the content, like title, legend, axis title or labels.void
setSpacing(String spacings)
Sets the distance between the outer edge of the chart and the content, like title, legend, axis title or labels.void
setSpacingBottom(Number spacingBottom)
Sets the space between the bottom edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).void
setSpacingLeft(Number spacingLeft)
Sets the space between the left edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).void
setSpacingRight(Number spacingRight)
Sets the space between the right edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).void
setSpacingTop(Number spacingTop)
Sets the space between the top edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).void
setStyle(String style)
Sets additional CSS styles to apply inline to the containerdiv
.<K,V>
voidsetStyle(Map<K,V> style)
Sets additional CSS styles to apply inline to the containerdiv
.void
setStyledMode(boolean styledMode)
Sets whether to apply styled mode.void
setSubtitle(String subtitle)
Sets the chart subtitlevoid
setSubtitle(Subtitle subtitle)
Sets the Subtitle optionsvoid
setTheme(Theme theme)
Sets the theme options for all Charts in the same browser page.void
setTitle(String title)
Sets the chart title.void
setTitle(Title title)
Sets the Title optionsvoid
setTooltip(Tooltip tooltip)
Sets the Tooltip optionsvoid
setType(String type)
Set the chart's type (Charts.PIE, Charts.BAR, Charts.LINE, etc.).void
setVflex(String flex)
Sets vertical flex hint of this chart.void
setWidth(Number width)
Sets an explicit width for the chart.void
setXAxis(XAxis xaxis)
Sets the xAxis with out putting it in an Arrayvoid
setYAxis(YAxis yaxis)
Sets the yAxis with out putting it in an Arrayvoid
setZAxis(ZAxis zaxis)
Sets the zAxis with out putting it in an Arrayvoid
setZclass(String zclass)
Sets the zclass for this componentvoid
setZoomType(String zoomType)
Sets decides in what dimentions the user can zoom by dragging the mouse.void
showLoading(String text)
Shows the loading dim the chart'ts plot area with the given text after rendering time, if any.protected void
smartDrawChart()
mark a draw flag to inform that this Chart needs update.protected void
smartUpdate(String attr, Object value, boolean append)
void
toggleSonify()
Play/pause sonification of a chart.-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, clone, 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, getExtraCtrl, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getPropertyAccess, 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, isChildable, 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, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
-
-
-
Field Detail
-
ARC_DIAGRAM
public static final String ARC_DIAGRAM
Chart type: arcdiagram- See Also:
- Constant Field Values
-
AREA
public static final String AREA
Chart type: area- See Also:
- Constant Field Values
-
AREA_RANGE
public static final String AREA_RANGE
Chart type: area range- See Also:
- Constant Field Values
-
AREA_SPLINE
public static final String AREA_SPLINE
Chart type: area spline- See Also:
- Constant Field Values
-
AREA_SPLINE_RANGE
public static final String AREA_SPLINE_RANGE
Chart type: area spline range- See Also:
- Constant Field Values
-
BAR
public static final String BAR
Chart type: bar- See Also:
- Constant Field Values
-
BELLCURVE
public static final String BELLCURVE
Chart type: bell curve- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
BOX_PLOT
public static final String BOX_PLOT
Chart type: boxplot- See Also:
- Constant Field Values
-
BUBBLE
public static final String BUBBLE
Chart type: bubble- See Also:
- Constant Field Values
-
COLUMN
public static final String COLUMN
Chart type: column- See Also:
- Constant Field Values
-
COLUMN_PYRAMID
public static final String COLUMN_PYRAMID
Chart type: column pyramid- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
COLUMN_RANGE
public static final String COLUMN_RANGE
Chart type: column range- See Also:
- Constant Field Values
-
CYLINDER
public static final String CYLINDER
Chart type: cylinder- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
DEPENDENCYWHEEL
public static final String DEPENDENCYWHEEL
Chart type: dependency wheel- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
DUMBBELL
public static final String DUMBBELL
Chart type: dumbbell- Since:
- 10.2.1.0
- See Also:
- Constant Field Values
-
ERROR_BAR
public static final String ERROR_BAR
Chart type: error bar- See Also:
- Constant Field Values
-
FUNNEL
public static final String FUNNEL
Chart type: funnel- See Also:
- Constant Field Values
-
FUNNEL3D
public static final String FUNNEL3D
Chart type: funnel 3d- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
GAUGE
public static final String GAUGE
Chart type: gauge- See Also:
- Constant Field Values
-
HISTOGRAM
public static final String HISTOGRAM
Chart type: histogram- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
ITEM
public static final String ITEM
Chart type: item- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
SOLID_GAUGE
public static final String SOLID_GAUGE
Chart type: solid gauge- See Also:
- Constant Field Values
-
LINE
public static final String LINE
Chart type: line- See Also:
- Constant Field Values
-
LOLLIPOP
public static final String LOLLIPOP
Chart type: lollipop- Since:
- 10.2.1.0
- See Also:
- Constant Field Values
-
NETWOKRGRAPH
public static final String NETWOKRGRAPH
Chart type: network graph- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
ORGANIZATION
public static final String ORGANIZATION
Chart type: organization- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
PARETO
public static final String PARETO
Chart type: pareto- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
PIE
public static final String PIE
Chart type: pie- See Also:
- Constant Field Values
-
POLYGON
public static final String POLYGON
Chart type: polygon- See Also:
- Constant Field Values
-
SANKEY
public static final String SANKEY
Chart type: sankey- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
SCATTER
public static final String SCATTER
Chart type: scatter- See Also:
- Constant Field Values
-
SCATTER3D
public static final String SCATTER3D
Chart type: scatter3d- See Also:
- Constant Field Values
-
SERIES
public static final String SERIES
Chart type: series- See Also:
- Constant Field Values
-
SPLINE
public static final String SPLINE
Chart type: spline- See Also:
- Constant Field Values
-
STREAMGRAPH
public static final String STREAMGRAPH
Chart type: stream graph- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
SUNBURST
public static final String SUNBURST
Chart type: sunburst- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
TILEMAP
public static final String TILEMAP
Chart type: tilemap- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
TIMELINE
public static final String TIMELINE
Chart type: timeline- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
WATERFALL
public static final String WATERFALL
Chart type: waterfall- See Also:
- Constant Field Values
-
PACKEDBUBBLE
public static final String PACKEDBUBBLE
Chart type: packed bubble- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
POLAR
@Deprecated public static final String POLAR
Deprecated.since 3.0.2. UseChart.setPolar(boolean)
instead.Chart type: polar- See Also:
- Constant Field Values
-
PYRAMID
public static final String PYRAMID
Chart type: pyramid- See Also:
- Constant Field Values
-
PYRAMID3D
public static final String PYRAMID3D
Chart type: pyramid3d- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
HEATMAP
public static final String HEATMAP
Chart type: heat map- See Also:
- Constant Field Values
-
TREEGRAPH
public static final String TREEGRAPH
Chart type: treegraph- Since:
- 10.3.3.0
- See Also:
- Constant Field Values
-
TREEMAP
public static final String TREEMAP
Chart type: tree map- See Also:
- Constant Field Values
-
VARIABLEPIE
public static final String VARIABLEPIE
Chart type: variable pie- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
VARIWIDE
public static final String VARIWIDE
Chart type: variwide- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
VECTOR
public static final String VECTOR
Chart type: vector- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
VENN
public static final String VENN
Chart type: venn- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
WINDBARB
public static final String WINDBARB
Chart type: wind barb- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
WORDCLOUD
public static final String WORDCLOUD
Chart type: word cloud- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
XRANGE
public static final String XRANGE
Chart type: xrange- Since:
- 7.2.1.0
- See Also:
- Constant Field Values
-
_zclass
protected String _zclass
The ZK CSS class.
-
-
Method Detail
-
getPlotData
public PlotData getPlotData()
Returns the plot data which is a JSON object to collect all chart's options for Charts JS.- Specified by:
getPlotData
in interfaceChartsApi
-
getAccessibility
public Accessibility getAccessibility()
Returns options for configuring accessibility for the chart.- Specified by:
getAccessibility
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
ChartsApi.getAccessibility()
-
setAccessibility
public void setAccessibility(Accessibility accessibility)
Sets options for configuring accessibility for the chart.- Specified by:
setAccessibility
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
ChartsApi.setAccessibility(Accessibility)
-
getData
public Data getData()
Returns the data object.
-
getDrilldown
public Drilldown getDrilldown()
Returns the drilldown object.- Specified by:
getDrilldown
in interfaceChartsApi
-
setOptions
public void setOptions(Options options)
Sets the global options for all Charts in the same browser page.
-
setDateFormat
public void setDateFormat(String format, Number time, boolean capitalize)
Sets the formats a JavaScript date timestamp (milliseconds since Jan 1st 1970) into a human readable date string. The format is a subset of the formats for PHP's strftime function.- Parameters:
format
- A string containing some of the formats above.time
- The JavaScript time to format.capitalize
- Whether to capitalize words in the return string.
-
setNumberFormat
public void setNumberFormat(Number number, Number decimals, String decimalPoint, String thousandsSep)
Formats a JavaScript number with grouped thousands, a fixed amount of decimals and an optional decimal point. It is a port of PHP's function with the same name. See PHP number_format for a full explanation of the parameters.- Parameters:
number
- The raw number to format.decimals
- The desired number of decimals.decimalPoint
- The decimal point. Defaults to "." or to the string specified globally inLang.setDecimalPoint(String)
.thousandsSep
- The thousands separator. Defaults to " " or to the string specified globally inLang.setThousandsSep(String)
-
setColors
public void setColors(List<Color> colors)
Sets the default colors for the chart's series. When all colors are used, new colors are pulled from the start again.
-
setColors
public void setColors(String... source)
Sets the default colors for the chart's series. When all colors are used, new colors are pulled from the start again.
-
getColors
public List<Color> getColors()
Returns the default colors for the chart's series. When all colors are used, new colors are pulled from the start again.
-
setTheme
public void setTheme(Theme theme)
Sets the theme options for all Charts in the same browser page.
-
getTheme
public Theme getTheme()
Returns the global theme for all Charts.Default is null
-
getOptions
public Options getOptions()
Returns the global options for all Charts.Default is null.
-
getModel
public ChartsModel getModel()
Returns the chart model associated with this chart, or null if this chart is not associated with any chart data model.
-
setModel
public void setModel(ChartsModel model)
Sets the chart model associated with this chart. If a non-null model is assigned, no matter whether it is the same as the previous, it will always cause re-render.
-
setModel
public void setModel(org.zkoss.zul.ChartModel model)
-
onSyncModel
public void onSyncModel()
-
showLoading
public void showLoading(String text)
Shows the loading dim the chart'ts plot area with the given text after rendering time, if any.
-
hideLoading
public void hideLoading()
Hides the loading dim the chart'ts plot area after rendering time.
-
print
public void print()
Clears away other elements in the page and prints the chart as it is displayed.
-
setType
public void setType(String type)
Set the chart's type (Charts.PIE, Charts.BAR, Charts.LINE, etc.).Default: line.
-
getType
public String getType()
Get the chart's type.Default: line.
-
setAlignTicks
public void setAlignTicks(boolean alignTicks)
Sets when using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks. This can be prevented by settingalignTicks
to false. If the grid lines look messy, it's a good idea to hide them for the secondary axis by settinggridLineWidth
to 0.- Specified by:
setAlignTicks
in interfaceChartsApi
- Parameters:
alignTicks
- when using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks- See Also:
Chart.setAlignTicks(boolean)
-
isAlignTicks
public boolean isAlignTicks()
Returns when using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks. This can be prevented by settingalignTicks
to false. If the grid lines look messy, it's a good idea to hide them for the secondary axis by settinggridLineWidth
to 0.Default: true.
- Specified by:
isAlignTicks
in interfaceChartsApi
- See Also:
Chart.isAlignTicks()
-
setAnimation
public void setAnimation(boolean animation)
Animation can be disabled throughout the chart by setting it to false here. It can be overridden for each individual API method as a function parameter. The only animation not affected by this option is the initial series animation, seeSeriesPlotOptions.setAnimation(boolean)
.- Specified by:
setAnimation
in interfaceChartsApi
- See Also:
Chart.setAnimation(boolean)
,Animation
-
isAnimation
public boolean isAnimation()
Returns whether enable the animationDefault: true
- Specified by:
isAnimation
in interfaceChartsApi
-
setIgnoreHiddenSeries
public void setIgnoreHiddenSeries(boolean ignoreHiddenSeries)
Sets to ignore the hidden series, if true, the axes will scale to the remaining visible series once one series is hidden. If false, hiding and showing a series will not affect the axes or the other series. For stacks, once one series within the stack is hidden, the rest of the stack will close in around it even if the axis is not affected.- Specified by:
setIgnoreHiddenSeries
in interfaceChartsApi
- Parameters:
ignoreHiddenSeries
- if true, the axes will scale to the remaining visible series once one series is hidden
-
isIgnoreHiddenSeries
public boolean isIgnoreHiddenSeries()
Returns if true, the axes will scale to the remaining visible series once one series is hidden. If false, hiding and showing a series will not affect the axes or the other series. For stacks, once one series within the stack is hidden, the rest of the stack will close in around it even if the axis is not affected.Default: true.
- Specified by:
isIgnoreHiddenSeries
in interfaceChartsApi
-
setBackgroundColor
public void setBackgroundColor(String backgroundColor)
Sets the background color for the outer chart area.- Specified by:
setBackgroundColor
in interfaceChartsApi
- Parameters:
backgroundColor
- the background color for the outer chart area
-
setBackgroundColor
public void setBackgroundColor(LinearGradient gradient)
Sets the background gradient for the outer chart area.- Specified by:
setBackgroundColor
in interfaceChartsApi
-
setBackgroundColor
public void setBackgroundColor(RadialGradient gradient)
Sets the background gradient for the outer chart area.- Specified by:
setBackgroundColor
in interfaceChartsApi
-
setBackgroundColor
public void setBackgroundColor(Color color)
Sets the background gradient for the outer chart area.- Specified by:
setBackgroundColor
in interfaceChartsApi
-
getBackgroundColor
public Color getBackgroundColor()
Returns the background color for the outer chart area.Default: "#FFFFFF".
- Specified by:
getBackgroundColor
in interfaceChartsApi
- See Also:
Chart.getBackgroundColor()
-
setBorderColor
public void setBorderColor(String borderColor)
Sets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.- Specified by:
setBorderColor
in interfaceChartsApi
-
setBorderColor
public void setBorderColor(LinearGradient borderColor)
Sets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.- Specified by:
setBorderColor
in interfaceChartsApi
-
setBorderColor
public void setBorderColor(RadialGradient borderColor)
Sets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.- Specified by:
setBorderColor
in interfaceChartsApi
-
setBorderColor
public void setBorderColor(Color borderColor)
Sets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.- Specified by:
setBorderColor
in interfaceChartsApi
-
getBorderColor
public Color getBorderColor()
Returns the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.Default: "#4572A7".
- Specified by:
getBorderColor
in interfaceChartsApi
- See Also:
Chart.getBorderColor()
-
setBorderRadius
public void setBorderRadius(Number borderRadius)
Sets the corner radius of the outer chart border. In export, the radius defaults to 0.Default: 5.
- Specified by:
setBorderRadius
in interfaceChartsApi
- Parameters:
borderRadius
- the corner radius of the outer chart border- See Also:
Chart.setBorderRadius(Number)
-
getBorderRadius
public Object getBorderRadius()
Returns the corner radius of the outer chart border. In export, the radius defaults to 0.Default: 5.
- Specified by:
getBorderRadius
in interfaceChartsApi
- See Also:
Chart.getBorderRadius()
-
setBorderWidth
public void setBorderWidth(Number borderWidth)
Sets the pixel width of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.- Specified by:
setBorderWidth
in interfaceChartsApi
- See Also:
Chart.setBorderWidth(Number)
-
getBorderWidth
public Number getBorderWidth()
Returns the pixel width of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.Default: 0.
- Specified by:
getBorderWidth
in interfaceChartsApi
- See Also:
Chart.getBorderWidth()
-
setWidth
public void setWidth(Number width)
Sets an explicit width for the chart. By default the width is calculated from the offset width of the containing element.- Specified by:
setWidth
in interfaceChartsApi
- Parameters:
width
- an explicit width for the chart- See Also:
Chart.setWidth(Number)
-
getWidth
public Number getWidth()
Returns an explicit width for the chart. By default the width is calculated from the offset width of the containing element.Default: null.
- Specified by:
getWidth
in interfaceChartsApi
- See Also:
Chart.getWidth()
-
setHeight
public void setHeight(Number height)
Sets an explicit height for the chart. By default the height is calculated from the offset height of the containing element, or 400 pixels if the containing element's height is 0.- Specified by:
setHeight
in interfaceChartsApi
- Parameters:
height
- an explicit height for the chart- See Also:
Chart.setHeight(Number)
-
setHeight
public void setHeight(String height)
Description copied from interface:ChartsApi
Sets an explicit height for the chart. If given a percentage string (for example '56%'), the height is given as the percentage of the actual chart width. This allows for preserving the aspect ratio across responsive sizes.
-
getHeight
public Number getHeight()
Returns an explicit height for the chart. By default the height is calculated from the offset height of the containing element, or 400 pixels if the containing element's height is 0.Default: null.
- Specified by:
getHeight
in interfaceChartsApi
- See Also:
Chart.getHeight()
-
setInverted
public void setInverted(boolean inverted)
Sets whether to invert the axes so that the x axis is vertical and y axis is horizontal. When true, the x axis is reversed by default. If a bar series is present in the chart, it will be inverted automatically.- Specified by:
setInverted
in interfaceChartsApi
- See Also:
Chart.setInverted(boolean)
-
isInverted
public boolean isInverted()
Returns whether to invert the axes so that the x axis is vertical and y axis is horizontal. When true, the x axis is reversed by default. If a bar series is present in the chart, it will be inverted automatically.Default: false.
- Specified by:
isInverted
in interfaceChartsApi
- See Also:
Chart.isInverted()
-
setMargin
public void setMargin(String margins)
Sets the margin between the outer edge of the chart and the plot area. The numbers in the array designate top, right, bottom and left respectively. Use the methods ofsetMarginTop(Number)
,setMarginRight(Number)
,setMarginBottom(Number)
andsetMarginLeft(Number)
for shorthand setting of one option.Default: null.
- Specified by:
setMargin
in interfaceChartsApi
- See Also:
setMargin(Number[])
-
setMargin
public void setMargin(Number margin)
Sets the margin between the outer edge of the chart and the plot area.
-
setMargin
public void setMargin(Number[] margin)
Sets the margin between the outer edge of the chart and the plot area. The numbers in the array designate top, right, bottom and left respectively. Use the methods ofsetMarginTop(Number)
,setMarginRight(Number)
,setMarginBottom(Number)
andsetMarginLeft(Number)
for shorthand setting of one option.Default: null.
- Specified by:
setMargin
in interfaceChartsApi
- See Also:
setMargin(String)
,Chart.setMargin(Number[])
-
getMargin
public Number[] getMargin()
Returns the margin between the outer edge of the chart and the plot area. The numbers in the array designate top, right, bottom and left respectively. Use the methods ofsetMarginTop(Number)
,setMarginRight(Number)
,setMarginBottom(Number)
andsetMarginLeft(Number)
for shorthand setting of one option.Default: null.
- Specified by:
getMargin
in interfaceChartsApi
- See Also:
Chart.getMargin()
-
setMarginBottom
public void setMarginBottom(Number marginBottom)
Sets the margin between the bottom outer edge of the chart and the plot area. Use this to set a fixed pixel value for the margin as opposed to the default dynamic margin. See alsosetSpacingBottom(Number)
.- Specified by:
setMarginBottom
in interfaceChartsApi
- Parameters:
marginBottom
- the margin between the bottom outer edge of the chart and the plot area- See Also:
Chart.setMarginBottom(Number)
-
getMarginBottom
public Number getMarginBottom()
Returns the margin between the bottom outer edge of the chart and the plot area.Default: null.
- Specified by:
getMarginBottom
in interfaceChartsApi
- See Also:
Chart.getMarginBottom()
-
setMarginLeft
public void setMarginLeft(Number marginLeft)
Sets the margin between the left outer edge of the chart and the plot area. Use this to set a fixed pixel value for the margin as opposed to the default dynamic margin. See alsosetSpacingLeft(Number)
- Specified by:
setMarginLeft
in interfaceChartsApi
- Parameters:
marginLeft
- the margin between the left outer edge of the chart and the plot area- See Also:
Chart.setMarginLeft(Number)
-
getMarginLeft
public Number getMarginLeft()
Returns the margin between the left outer edge of the chart and the plot area.Default: null.
- Specified by:
getMarginLeft
in interfaceChartsApi
- See Also:
Chart.getMarginLeft()
-
setMarginRight
public void setMarginRight(Number marginRight)
Sets the margin between the right outer edge of the chart and the plot area. Use this to set a fixed pixel value for the margin as opposed to the default dynamic margin. See alsosetSpacingRight(Number)
.- Specified by:
setMarginRight
in interfaceChartsApi
- Parameters:
marginRight
- the margin between the right outer edge of the chart and the plot area- See Also:
Chart.setMarginRight(Number)
-
getMarginRight
public Number getMarginRight()
Returns the margin between the right outer edge of the chart and the plot area.Default: null.
- Specified by:
getMarginRight
in interfaceChartsApi
- See Also:
Chart.getMarginRight()
-
setMarginTop
public void setMarginTop(Number marginTop)
Sets the margin between the top outer edge of the chart and the plot area. Use this to set a fixed pixel value for the margin as opposed to the default dynamic margin. See alsosetSpacingTop(Number)
.- Specified by:
setMarginTop
in interfaceChartsApi
- Parameters:
marginTop
- the margin between the top outer edge of the chart and the plot area- See Also:
Chart.setMarginTop(Number)
-
getMarginTop
public Number getMarginTop()
Returns the margin between the top outer edge of the chart and the plot area.Default: null.
- Specified by:
getMarginTop
in interfaceChartsApi
- See Also:
Chart.getMarginTop()
-
setPinchType
public void setPinchType(String pinchType)
Sets equivalent tosetZoomType(String)
, but for multitouch gestures only. By default, thepinchType
is the same as thezoomType
setting. However, pinching can be enabled separately in some cases, for example in stock charts where a mouse drag pans the chart, while pinching is enabled.Default: null.
- Specified by:
setPinchType
in interfaceChartsApi
- See Also:
setZoomType(String)
,Chart.setPinchType(String)
-
getPinchType
public String getPinchType()
Returns equivalent togetZoomType()
, but for multitouch gestures only. By default, thepinchType
is the same as thezoomType
setting. However, pinching can be enabled separately in some cases, for example in stock charts where a mouse drag pans the chart, while pinching is enabled.Default: null.
- Specified by:
getPinchType
in interfaceChartsApi
- See Also:
Chart.getPinchType()
-
setPlotBackgroundColor
public void setPlotBackgroundColor(String plotBackgroundColor)
Sets the background color for the plot area.- Specified by:
setPlotBackgroundColor
in interfaceChartsApi
-
setPlotBackgroundColor
public void setPlotBackgroundColor(LinearGradient plotBackgroundColor)
Sets the background color for the plot area.- Specified by:
setPlotBackgroundColor
in interfaceChartsApi
-
setPlotBackgroundColor
public void setPlotBackgroundColor(RadialGradient plotBackgroundColor)
Sets the background color for the plot area.- Specified by:
setPlotBackgroundColor
in interfaceChartsApi
-
setPlotBackgroundColor
public void setPlotBackgroundColor(Color plotBackgroundColor)
Sets the background color for the plot area.- Specified by:
setPlotBackgroundColor
in interfaceChartsApi
-
getPlotBackgroundColor
public Color getPlotBackgroundColor()
Returns the background color for the plot area.Default: null.
- Specified by:
getPlotBackgroundColor
in interfaceChartsApi
- See Also:
Chart.getPlotBackgroundColor()
-
setPlotBackgroundImage
public void setPlotBackgroundImage(String plotBackgroundImage)
Sets the URL for an image to use as the plot background. To set an image as the background for the entire chart, set a CSS background image to the container element. Note that for the image to be applied to exported charts, its URL needs to be accessible by the export server.- Specified by:
setPlotBackgroundImage
in interfaceChartsApi
- Parameters:
plotBackgroundImage
- the URL for an image to use as the plot background- See Also:
Chart.setPlotBackgroundImage(String)
-
getPlotBackgroundImage
public String getPlotBackgroundImage()
Returns the URL for an image to use as the plot background.Default: null.
- Specified by:
getPlotBackgroundImage
in interfaceChartsApi
- See Also:
Chart.getPlotBackgroundImage()
-
setPlotBorderColor
public void setPlotBorderColor(String plotBorderColor)
Sets the color of the inner chart or plot area border.- Specified by:
setPlotBorderColor
in interfaceChartsApi
-
setPlotBorderColor
public void setPlotBorderColor(LinearGradient plotBorderColor)
Sets the color of the inner chart or plot area border.- Specified by:
setPlotBorderColor
in interfaceChartsApi
-
setPlotBorderColor
public void setPlotBorderColor(RadialGradient plotBorderColor)
Sets the color of the inner chart or plot area border.- Specified by:
setPlotBorderColor
in interfaceChartsApi
-
setPlotBorderColor
public void setPlotBorderColor(Color plotBorderColor)
Sets the color of the inner chart or plot area border.- Specified by:
setPlotBorderColor
in interfaceChartsApi
-
getPlotBorderColor
public Color getPlotBorderColor()
Returns the color of the inner chart or plot area border.Default: "#C0C0C0".
- Specified by:
getPlotBorderColor
in interfaceChartsApi
- See Also:
Chart.getPlotBorderColor()
-
setPlotBorderWidth
public void setPlotBorderWidth(Number plotBorderWidth)
Sets the pixel width of the plot area border.- Specified by:
setPlotBorderWidth
in interfaceChartsApi
- Parameters:
plotBorderWidth
- the pixel width of the plot area border- See Also:
Chart.setPlotBorderWidth(Number)
-
getPlotBorderWidth
public Number getPlotBorderWidth()
Returns the pixel width of the plot area border.Default: 0.
- Specified by:
getPlotBorderWidth
in interfaceChartsApi
- See Also:
Chart.getPlotBorderWidth()
-
setPlotShadow
public void setPlotShadow(boolean plotShadow)
Sets whether to apply a drop shadow to the plot area. Requires thatsetPlotBackgroundColor(String)
be set.- Specified by:
setPlotShadow
in interfaceChartsApi
- Parameters:
plotShadow
- whether to apply a drop shadow to the plot area- See Also:
Chart.setPlotShadow(boolean)
-
isPlotShadow
public boolean isPlotShadow()
Returns whether to apply a drop shadow to the plot area. Requires thatsetPlotBackgroundColor(String)
be set.Default: false.
- Specified by:
isPlotShadow
in interfaceChartsApi
- See Also:
Chart.isPlotShadow()
-
setPolar
public void setPolar(boolean polar)
Sets to true to enable the cartesian charts like line, spline, area and column are transformed into the polar coordinate system.- Specified by:
setPolar
in interfaceChartsApi
- Parameters:
polar
- when true, cartesian charts like line, spline, area and column are transformed into the polar coordinate system- See Also:
Chart.setPolar(boolean)
-
isPolar
public boolean isPolar()
Returns whether transforms into the polar coordinate systemDefault: false.
- Specified by:
isPolar
in interfaceChartsApi
- See Also:
Chart.isPolar()
-
setReflow
public void setReflow(boolean reflow)
Sets whether to reflow the chart to fit the width of the container div on resizing the window.- Specified by:
setReflow
in interfaceChartsApi
- Parameters:
reflow
- whether to reflow the chart to fit the width of the container div on resizing the window- See Also:
Chart.setReflow(boolean)
-
isReflow
public boolean isReflow()
Returns whether to reflow the chart to fit the width of the container div on resizing the window.Default: true.
- Specified by:
isReflow
in interfaceChartsApi
- See Also:
Chart.isReflow()
-
getResetZoomButton
public ResetZoomButton getResetZoomButton()
Description copied from interface:ChartsApi
Returns the button that appears after a selection zoom, allowing the user to reset zoom.Default: null.
- Specified by:
getResetZoomButton
in interfaceChartsApi
-
setResetZoomButton
public void setResetZoomButton(ResetZoomButton resetZoomButton)
Description copied from interface:ChartsApi
Sets the button that appears after a selection zoom, allowing the user to reset zoom.- Specified by:
setResetZoomButton
in interfaceChartsApi
- Parameters:
resetZoomButton
- the button that appears after a selection zoom, allowing the user to reset zoom
-
getScrollablePlotArea
public ScrollablePlotArea getScrollablePlotArea()
Description copied from interface:ChartsApi
Returns the options for a scrollable plot area.- Specified by:
getScrollablePlotArea
in interfaceChartsApi
-
setScrollablePlotArea
public void setScrollablePlotArea(ScrollablePlotArea scrollablePlotArea)
Description copied from interface:ChartsApi
Sets the options for a scrollable plot area.- Specified by:
setScrollablePlotArea
in interfaceChartsApi
-
setSelectionMarkerFill
public void setSelectionMarkerFill(String selectionMarkerFill)
Sets the background color of the marker square when selecting (zooming in on) an area of the chart.- Specified by:
setSelectionMarkerFill
in interfaceChartsApi
-
setSelectionMarkerFill
public void setSelectionMarkerFill(LinearGradient selectionMarkerFill)
Sets the background color of the marker square when selecting (zooming in on) an area of the chart.- Specified by:
setSelectionMarkerFill
in interfaceChartsApi
-
setSelectionMarkerFill
public void setSelectionMarkerFill(RadialGradient selectionMarkerFill)
Sets the background color of the marker square when selecting (zooming in on) an area of the chart.- Specified by:
setSelectionMarkerFill
in interfaceChartsApi
-
setSelectionMarkerFill
public void setSelectionMarkerFill(Color selectionMarkerFill)
Sets the background color of the marker square when selecting (zooming in on) an area of the chart.- Specified by:
setSelectionMarkerFill
in interfaceChartsApi
-
getSelectionMarkerFill
public Color getSelectionMarkerFill()
Returns the background color of the marker square when selecting (zooming in on) an area of the chart.Default: "rgba(69,114,167,0.25)".
- Specified by:
getSelectionMarkerFill
in interfaceChartsApi
- See Also:
Chart.getSelectionMarkerFill()
-
setShadow
public void setShadow(boolean shadow)
Sets whether to apply a drop shadow to the outer chart area. Requires that backgroundColor be set.- Specified by:
setShadow
in interfaceChartsApi
- Parameters:
shadow
- whether to apply a drop shadow to the outer chart area- See Also:
Chart.setShadow(boolean)
-
isShadow
public boolean isShadow()
Returns whether to apply a drop shadow to the outer chart area. Requires that backgroundColor be set.Default: false.
- Specified by:
isShadow
in interfaceChartsApi
- See Also:
Chart.isShadow()
-
setShowAxes
public void setShowAxes(boolean showAxes)
Sets whether to show the axes initially. This only applies to empty charts where series are added dynamically, as axes are automatically added to cartesian series.- Specified by:
setShowAxes
in interfaceChartsApi
- Parameters:
showAxes
- whether to show the axes initially- See Also:
Chart.setShowAxes(boolean)
-
isShowAxes
public boolean isShowAxes()
Returns whether to show the axes initially. This only applies to empty charts where series are added dynamically, as axes are automatically added to cartesian series.Default: false.
- Specified by:
isShowAxes
in interfaceChartsApi
- See Also:
Chart.isShowAxes()
-
getSonification
public Sonification getSonification()
Returns the sonification options, if any. Otherwise, create a new one.- Specified by:
getSonification
in interfaceChartsApi
- Since:
- 11.2.0.0
-
setSonification
public void setSonification(Sonification sonification)
Sets the sonification options- Specified by:
setSonification
in interfaceChartsApi
- Since:
- 11.2.0.0
-
setSpacing
public void setSpacing(String spacings)
Sets the distance between the outer edge of the chart and the content, like title, legend, axis title or labels. The numbers in the array designate top, right, bottom and left respectively. Use the methods ofsetSpacingTop(Number)
,setSpacingRight(Number)
,setSpacingBottom(Number)
andsetSpacingLeft(Number)
for shorthand setting of one option.- Specified by:
setSpacing
in interfaceChartsApi
- Parameters:
spacings
- the distance between the outer edge of the chart and the content, like title, legend, axis title or labels- See Also:
setSpacing(Number[])
-
setSpacing
public void setSpacing(Number[] spacing)
Sets the distance between the outer edge of the chart and the content, like title, legend, axis title or labels. The numbers in the array designate top, right, bottom and left respectively. Use the methods ofsetSpacingTop(Number)
,setSpacingRight(Number)
,setSpacingBottom(Number)
andsetSpacingLeft(Number)
for shorthand setting of one option.- Specified by:
setSpacing
in interfaceChartsApi
- Parameters:
spacing
- the distance between the outer edge of the chart and the content, like title, legend, axis title or labels- See Also:
Chart.setSpacing(Number[])
-
getSpacing
public Number[] getSpacing()
Returns the distance between the outer edge of the chart and the content, like title, legend, axis title or labels. The numbers in the array designate top, right, bottom and left respectively.Default: [10, 10, 15, 10].
- Specified by:
getSpacing
in interfaceChartsApi
-
setSpacingBottom
public void setSpacingBottom(Number spacingBottom)
Sets the space between the bottom edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).- Specified by:
setSpacingBottom
in interfaceChartsApi
- Parameters:
spacingBottom
- The space between the bottom edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position)- See Also:
Chart.setSpacingBottom(Number)
-
getSpacingBottom
public Number getSpacingBottom()
Returns the space between the bottom edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).Default: 15.
- Specified by:
getSpacingBottom
in interfaceChartsApi
- See Also:
Chart.getSpacingBottom()
-
setSpacingLeft
public void setSpacingLeft(Number spacingLeft)
Sets the space between the left edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).- Specified by:
setSpacingLeft
in interfaceChartsApi
- Parameters:
spacingLeft
- The space between the left edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position)- See Also:
Chart.setSpacingLeft(Number)
-
getSpacingLeft
public Number getSpacingLeft()
Returns the space between the left edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).Default: 10.
- Specified by:
getSpacingLeft
in interfaceChartsApi
- See Also:
Chart.getSpacingLeft()
-
setSpacingRight
public void setSpacingRight(Number spacingRight)
Sets the space between the right edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).- Specified by:
setSpacingRight
in interfaceChartsApi
- Parameters:
spacingRight
- The space between the right edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position)- See Also:
Chart.setSpacingRight(Number)
-
getSpacingRight
public Number getSpacingRight()
Returns the space between the right edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).Default: 10.
- Specified by:
getSpacingRight
in interfaceChartsApi
- See Also:
Chart.getSpacingRight()
-
setSpacingTop
public void setSpacingTop(Number spacingTop)
Sets the space between the top edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).- Specified by:
setSpacingTop
in interfaceChartsApi
- Parameters:
spacingTop
- The space between the top edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position)- See Also:
Chart.setSpacingTop(Number)
-
getSpacingTop
public Number getSpacingTop()
Returns the space between the top edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).Default: 10.
- Specified by:
getSpacingTop
in interfaceChartsApi
- See Also:
Chart.getSpacingTop()
-
setStyle
public void setStyle(String style)
Sets additional CSS styles to apply inline to the containerdiv
. Note that since the default font styles are applied in the renderer, it is ignorant of the individual chart options and must be set globally.This method allows simple settings like
label.setStyle("fontWeight: 'bold'; color: 'white'; textShadow: '0px 1px 2px black'");
In the format of CSS key:value, and ";" separating multiple key:value pairs, if you have more a complex CSS styling, we recommend using
setStyle(Map)
-
setStyle
public <K,V> void setStyle(Map<K,V> style)
Sets additional CSS styles to apply inline to the containerdiv
. Note that since the default font styles are applied in the renderer, it is ignorant of the individual chart options and must be set globally.This method allows complex styling like:
Map<String, Object> styles = new HashMap<String, Object>(); styles.put("fill", "#E8E8EA"); styles.put("stroke", "#6E6E78"); styles.put("stroke-width", "1"); styles.put("r", "0"); Map<String, Object> states = new HashMap<String, Object>(); Map<String, String> hover = new HashMap<String, String>(); hover.put("fill", "#F4F4F6"); hover.put("stroke", "#6E6E78"); hover.put("stroke-width", "1"); hover.put("r", "0"); states.put("hover", hover); styles.put("states", states); Map<String, String> style = new HashMap<String, String>(); style.put("color", "#4D5663"); style.put("fontSize", "12px"); style.put("fontFamily", "'Arial'"); style.put("fontWeight", "normal"); style.put("padding", "10px"); styles.put("style", style);
{ "fill": "#E8E8EA", "stroke": "#6E6E78", "stroke-width": "1", "r": "0", "states": { "hover": { "fill": "#F4F4F6", "stroke": "#6E6E78", "stroke-width": "1", "r": "0" } }, "style": { "color": "#4D5663", "fontSize": "12px", "fontFamily": "'Arial'", "fontWeight": "normal", "padding": "10px" } }
-
isStyledMode
public boolean isStyledMode()
Returns whether to apply styled mode. When in styled mode, no presentational attributes or CSS are applied to the chart SVG. Instead, CSS rules are required to style the chart. The default style sheet is available from highcharts.css.Default:
false
- Specified by:
isStyledMode
in interfaceChartsApi
- Since:
- 10.2.1.0
-
setStyledMode
public void setStyledMode(boolean styledMode)
Sets whether to apply styled mode. When in styled mode, no presentational attributes or CSS are applied to the chart SVG. Instead, CSS rules are required to style the chart. The default style sheet is available from highcharts.css.Default:
false
- Specified by:
setStyledMode
in interfaceChartsApi
- Since:
- 10.2.1.0
-
getStyle
public <K,V> Map<K,V> getStyle()
Returns additional CSS styles to apply inline to the containerdiv
. Note that since the default font styles are applied in the renderer, it is ignorant of the individual chart options and must be set globally. Defaults to:fontFamily: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif; fontSize: 12px
- Specified by:
getStyle
in interfaceChartsApi
- Type Parameters:
K
- type for the keyif style was set using
setStyle(String)
, type will be Stringif style was set using
setStyle(Map)
, type will be the same as the type from the key of the mapif style was not set, default style will be applied, and type will be String
V
- type for the valueif style was set using
setStyle(String)
, type will be Stringif style was set using
setStyle(Map)
, type will be the same as the type from the key of the mapif style was not set, default style will be applied, and type will be String
-
setZoomType
public void setZoomType(String zoomType)
Sets decides in what dimentions the user can zoom by dragging the mouse. Can be one ofx
,y
orxy
.- Specified by:
setZoomType
in interfaceChartsApi
- Parameters:
zoomType
- decides in what dimentions the user can zoom by dragging the mouse- See Also:
Chart.setZoomType(String)
-
getZoomType
public String getZoomType()
Returns decides in what dimentions the user can zoom by dragging the mouse. Can be one ofx
,y
orxy
.Default: null.
- Specified by:
getZoomType
in interfaceChartsApi
- See Also:
Chart.getZoomType()
-
smartDrawChart
protected void smartDrawChart()
mark a draw flag to inform that this Chart needs update.
-
getTooltip
public Tooltip getTooltip()
Returns the Tooltip options, if any. Otherwise, create a new one.- Specified by:
getTooltip
in interfaceChartsApi
- See Also:
Tooltip
-
setTooltip
public void setTooltip(Tooltip tooltip)
Sets the Tooltip options- Specified by:
setTooltip
in interfaceChartsApi
- Parameters:
tooltip
-
-
getChart
public Chart getChart()
Returns the Chart options, if any. Otherwise, create a new one.
-
setNoData
public void setNoData(NoData noData)
Sets the no-data options
-
getNoData
public NoData getNoData()
Returns the no-data options
-
getExporting
public Exporting getExporting()
Returns the Exporting options, if any. Otherwise, create a new one.- Specified by:
getExporting
in interfaceChartsApi
- See Also:
Exporting
-
setExporting
public void setExporting(Exporting exporting)
Sets the Exporting options.- Specified by:
setExporting
in interfaceChartsApi
- See Also:
Exporting
-
setCredits
public void setCredits(Credits credits)
Sets the Credits options- Specified by:
setCredits
in interfaceChartsApi
- Parameters:
credits
-
-
getCredits
public Credits getCredits()
Returns the Credits options, if any. Otherwise, create a new one.- Specified by:
getCredits
in interfaceChartsApi
- See Also:
Credits
-
setChart
public void setChart(Chart chart)
Sets the Chart options
-
getPane
public Pane getPane()
Returns the pane at the index 0
-
getPane
public Pane getPane(int index)
Returns the pane from the given index
-
getPaneSize
public int getPaneSize()
Returns the size of the pane list- Specified by:
getPaneSize
in interfaceChartsApi
-
getLegend
public Legend getLegend()
Returns the Legend options, if any. Otherwise, create a new one.
-
getLoading
public Loading getLoading()
Returns the Loading options, if any. Otherwise, create a new one.- Specified by:
getLoading
in interfaceChartsApi
- See Also:
Loading
-
setLegend
public void setLegend(Legend legend)
Sets the Legend options
-
getLabels
public Labels getLabels()
Returns the labels options
-
setLabels
public void setLabels(Labels labels)
Sets the labels options
-
getLang
public Lang getLang()
Returns the labels options
-
setLang
public void setLang(Lang lang)
Sets the labels options
-
setNavigation
public void setNavigation(Navigation navigation)
Sets the navigation options- Specified by:
setNavigation
in interfaceChartsApi
-
getNavigation
public Navigation getNavigation()
Returns the navigation options- Specified by:
getNavigation
in interfaceChartsApi
-
getPlotOptions
public PlotOptions getPlotOptions()
Returns the plotOptions option, if any. Otherwise, create a new one.- Specified by:
getPlotOptions
in interfaceChartsApi
- See Also:
PlotOptions
-
setPlotOptions
public void setPlotOptions(PlotOptions plotOptions)
Sets the plotOptions options- Specified by:
setPlotOptions
in interfaceChartsApi
- Parameters:
plotOptions
-
-
getSeries
public Series getSeries()
Returns the Series options, if any. Otherwise, create a new one.Returns the first series (index 0) by default.
- Specified by:
getSeries
in interfaceChartsApi
- See Also:
Series
,getSeries(int)
-
addSeries
public void addSeries(Series series)
Add a series to the chart after render time. Note that this method should never be used when adding data synchronously at chart render time, as it adds expense to the calculations and rendering. When adding data at the same time as the chart is initiated, add the series as a configuration option instead.
-
addAxis
public void addAxis(Axis axis)
Add an axis to the chart after render time. Note that this method should never be used when adding data synchronously at chart render time, as it adds expense to the calculations and rendering. When adding data at the same time as the chart is initiated, add the axis as a configuration option instead.
-
getSeriesSize
public int getSeriesSize()
Returns the size of series- Specified by:
getSeriesSize
in interfaceChartsApi
-
getSeries
public Series getSeries(int index)
Returns the Series options from the given index, if any. Otherwise, create a new one.
-
getXAxis
public XAxis getXAxis()
Returns the XAxis options, if any. Otherwise, create a new one.Returns the first xAxis (index 0) by default.
- Specified by:
getXAxis
in interfaceChartsApi
- See Also:
XAxis
,getXAxis(int)
-
getXAxis
public XAxis getXAxis(int index)
Returns the XAxis options from the given index, if any. Otherwise, create a new one.
-
getXAxisSize
public int getXAxisSize()
Returns the size of xAxis- Specified by:
getXAxisSize
in interfaceChartsApi
-
setXAxis
public void setXAxis(XAxis xaxis)
Sets the xAxis with out putting it in an Array
-
getYAxis
public YAxis getYAxis()
Returns the YAxis options, if any. Otherwise, create a new one.Returns the first yAxis (index 0) by default.
- Specified by:
getYAxis
in interfaceChartsApi
- See Also:
YAxis
,getYAxis(int)
-
getYAxis
public YAxis getYAxis(int index)
Returns the YAxis options from the given index, if any. Otherwise, create a new one.
-
getyAxisSize
public int getyAxisSize()
Deprecated.As of release 10.2.1.0, usinggetYAxisSize()
instead.Returns the size of yAxis- Specified by:
getyAxisSize
in interfaceChartsApi
-
getYAxisSize
public int getYAxisSize()
Returns the size of yAxis- Specified by:
getYAxisSize
in interfaceChartsApi
- Since:
- 10.2.1.0
-
setYAxis
public void setYAxis(YAxis yaxis)
Sets the yAxis with out putting it in an Array
-
getZAxis
public ZAxis getZAxis()
Returns the ZAxis options, if any. Otherwise, create a new one.Returns the first zAxis (index 0) by default.
- Specified by:
getZAxis
in interfaceChartsApi
- See Also:
ZAxis
,getZAxis(int)
-
getZAxis
public ZAxis getZAxis(int index)
Returns the ZAxis options from the given index, if any. Otherwise, create a new one.
-
getzAxisSize
public int getzAxisSize()
Returns the size of zAxis- Specified by:
getzAxisSize
in interfaceChartsApi
-
setZAxis
public void setZAxis(ZAxis zaxis)
Sets the zAxis with out putting it in an Array
-
getOptions3D
public Options3D getOptions3D()
Returns the options to render charts in 3 dimensions.Default: null.
- Specified by:
getOptions3D
in interfaceChartsApi
-
setOptions3D
public void setOptions3D(Options3D options3D)
Sets the options to render charts in 3 dimensions.- Specified by:
setOptions3D
in interfaceChartsApi
- Parameters:
options3D
- the options to render charts in 3 dimensions.
-
getColorAxis
public ColorAxis getColorAxis()
Returns the ColorAxis options, if any. Otherwise, create a new one.Returns the first colorAxis (index 0) by default.
- Specified by:
getColorAxis
in interfaceChartsApi
- See Also:
ColorAxis
,getColorAxis()
-
getColorAxis
public ColorAxis getColorAxis(int index)
Description copied from interface:ChartsApi
Returns the ColorAxis options from the given index, if any. Otherwise, create a new one.- Specified by:
getColorAxis
in interfaceChartsApi
- See Also:
ColorAxis
,ChartsApi.getColorAxis()
-
getClassName
public String getClassName()
Returns a CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.- Specified by:
getClassName
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
Chart.getClassName()
-
setClassName
public void setClassName(String className)
Sets a CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.- Specified by:
setClassName
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
Chart.setClassName(String)
-
setTitle
public void setTitle(String title)
Sets the chart title.
-
setTitle
public void setTitle(Title title)
Sets the Title options
-
getTitle
public Title getTitle()
Returns the Title options, if any. Otherwise, create a new one.
-
getSubtitle
public Subtitle getSubtitle()
Returns the Subtitle options, if any. Otherwise, create a new one.- Specified by:
getSubtitle
in interfaceChartsApi
- See Also:
Subtitle
-
setSubtitle
public void setSubtitle(String subtitle)
Sets the chart subtitle- Specified by:
setSubtitle
in interfaceChartsApi
- Parameters:
subtitle
-
-
setSubtitle
public void setSubtitle(Subtitle subtitle)
Sets the Subtitle options- Specified by:
setSubtitle
in interfaceChartsApi
- Parameters:
subtitle
-
-
setEnableZoomSelection
public void setEnableZoomSelection(boolean enableZoomSelection)
Sets whether selection event will zoom the chart to the selected area.- Specified by:
setEnableZoomSelection
in interfaceChartsApi
- See Also:
Chart.setEnableZoomSelection(boolean)
-
isEnableZoomSelection
public boolean isEnableZoomSelection()
Returns whether selection event will zoom the chart to the selected area.Default: true.
- Specified by:
isEnableZoomSelection
in interfaceChartsApi
- See Also:
Chart.isEnableZoomSelection()
-
getPanKey
public String getPanKey()
Returns setting a key to switch between zooming and panning. Can be one of alt, ctrl, meta (the command key on Mac and Windows key on Windows) or shift. The keys are mapped directly to the key properties of the click event argument (event.altKey, event.ctrlKey, event.metaKey and event.shiftKey).Default: null
- Specified by:
getPanKey
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
Chart.getPanKey()
-
setPanKey
public void setPanKey(String panKey)
Sets setting a key to switch between zooming and panning. Can be one of alt, ctrl, meta (the command key on Mac and Windows key on Windows) or shift. The keys are mapped directly to the key properties of the click event argument (event.altKey, event.ctrlKey, event.metaKey and event.shiftKey).- Specified by:
setPanKey
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
Chart.setPanKey(String)
-
isPanning
public boolean isPanning()
Returns if allow panning in a chart. Best used with panKey to combine zooming and panning. On touch devices, when the tooltip.followTouchMove option is true (default), panning requires two fingers. To allow panning with one finger, set followTouchMove to false.Default: false
- Specified by:
isPanning
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
Chart.isPanning()
-
setPanning
public void setPanning(boolean panning)
Sets if allow panning in a chart. Best used with panKey to combine zooming and panning. On touch devices, when the tooltip.followTouchMove option is true (default), panning requires two fingers. To allow panning with one finger, set followTouchMove to false.- Specified by:
setPanning
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
Chart.setPanning(boolean)
-
getParallelAxes
public ParallelAxes getParallelAxes()
Returns common options for all yAxes rendered in a parallel coordinates plot, if any. Otherwise, create a new one.- Specified by:
getParallelAxes
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
Chart.getParallelAxes()
-
setParallelAxes
public void setParallelAxes(ParallelAxes parallelAxes)
Sets common options for all yAxes rendered in a parallel coordinates plot.- Specified by:
setParallelAxes
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
Chart.setParallelAxes(ParallelAxes)
-
isParallelCoordinates
public boolean isParallelCoordinates()
Returns a flag to render charts as a parallel coordinates plot. In a parallel coordinates plot (||-coords) by default all required yAxes are generated and the legend is disabled.Default: false.
- Specified by:
isParallelCoordinates
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
Chart.isParallelCoordinates()
-
setParallelCoordinates
public void setParallelCoordinates(boolean parallelCoordinates)
Sets a flag to render charts as a parallel coordinates plot. In a parallel coordinates plot (||-coords) by default all required yAxes are generated and the legend is disabled.Default: false.
- Specified by:
setParallelCoordinates
in interfaceChartsApi
- Since:
- 10.2.1.0
- See Also:
Chart.setParallelCoordinates(boolean)
-
getCtrlKeys
public String getCtrlKeys()
Returns what keystrokes to intercept.Default: null.
- Since:
- 7.2.1.2
-
setCtrlKeys
public void setCtrlKeys(String ctrlKeys)
Sets what keystrokes to intercept.The string could be a combination of the following:
- ^k
- A control key, i.e., Ctrl+k, where k could be a~z, 0~9, #n
- @k
- A alt key, i.e., Alt+k, where k could be a~z, 0~9, #n
- $n
- A shift key, i.e., Shift+n, where n could be #n. Note: $a ~ $z are not supported.
- #home
- Home
- #end
- End
- #ins
- Insert
- #del
- Delete
- #bak
- Backspace
- #left
- Left arrow
- #right
- Right arrow
- #up
- Up arrow
- #down
- Down arrow
- #pgup
- PageUp
- #pgdn
- PageDn
- #f1 #f2 ... #f12
- Function keys representing F1, F2, ... F12
For example,
- ^a^d@c#f10#left#right
- It means you want to intercept Ctrl+A, Ctrl+D, Alt+C, F10, Left and Right.
- ^#left
- It means Ctrl+Left.
- ^#f1
- It means Ctrl+F1.
- @#f3
- It means Alt+F3.
Note: it doesn't support Ctrl+Alt, Shift+Ctrl, Shift+Alt or Shift+Ctrl+Alt.
- Since:
- 7.2.1.2
-
addSeriesAsDrilldown
public void addSeriesAsDrilldown(Point point, Series series)
Add a series to the chart as drilldown from a specific point in the parent series. This method is used for async drilldown, when clicking a point in a series should result in loading and displaying a more high-resolution series. When not async, the setup is simpler using the drilldown.series options structure.- Parameters:
point
- The existing Point object from which the drilldown will start.series
- The series options, as documented under plotOptions.series and under the plotOptions for each series type
-
isRendered
public boolean isRendered()
Returns whether the component has been rendered to client side. Most of the time this method is used for component developer only.
-
invalidate
public void invalidate()
- Specified by:
invalidate
in interfaceorg.zkoss.zk.ui.Component
- Overrides:
invalidate
in classorg.zkoss.zk.ui.AbstractComponent
-
renderProperties
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws IOException
- Overrides:
renderProperties
in classorg.zkoss.zk.ui.AbstractComponent
- Throws:
IOException
-
smartUpdate
protected void smartUpdate(String attr, Object value, boolean append)
- Overrides:
smartUpdate
in classorg.zkoss.zk.ui.AbstractComponent
-
service
public void service(org.zkoss.zk.au.AuRequest request, boolean everError)
- Specified by:
service
in interfaceorg.zkoss.zk.ui.sys.ComponentCtrl
- Overrides:
service
in classorg.zkoss.zk.ui.AbstractComponent
-
selectPoint
public void selectPoint(Point selPoint, boolean accumulate)
-
getSelectedPoints
public Set<Point> getSelectedPoints()
Returns a readonly set of all currently selected points in the chart. Points can be selected byPoint.setSelected(boolean)
,Point.select(boolean, boolean)
or by clicking.Note: the returned set is not live data. You need to call
getSelectedPoints()
again to retrieve the modified set when changing the point's selected attribute.
-
clearPointSelection
public void clearPointSelection()
Clears the selected points in the chart.
-
setZclass
public void setZclass(String zclass)
Sets the zclass for this component- Parameters:
zclass
-
-
getZclass
public String getZclass()
The default zclass is "z-charts"
-
getHflex
public String getHflex()
Returns horizontal flex hint of this chart.Default: null
- Returns:
- horizontal flex hint of this chart.
- See Also:
setHflex(java.lang.String)
-
setHflex
public void setHflex(String flex)
Sets horizontal flex hint of this chart.Default: null
- See Also:
getHflex()
-
getVflex
public String getVflex()
Returns vertical flex hint of this chart.Default: null
- Returns:
- vertical flex hint of this chart.
- See Also:
setVflex(java.lang.String)
-
setVflex
public void setVflex(String flex)
Sets vertical flex hint of this chart.Default: null
- See Also:
getVflex()
-
getAnnotation
public Annotation getAnnotation()
Description copied from interface:ChartsApi
Returns the Annotation options, if any. Otherwise, create a new one.Returns the first annotation (index 0) by default.
- Specified by:
getAnnotation
in interfaceChartsApi
- See Also:
Annotation
,ChartsApi.getAnnotation(int)
-
getAnnotation
public Annotation getAnnotation(int index)
Description copied from interface:ChartsApi
Returns the Annotation options from the given index, if any. Otherwise, create a new one.- Specified by:
getAnnotation
in interfaceChartsApi
- See Also:
Annotation
-
getAnnotationSize
public int getAnnotationSize()
Description copied from interface:ChartsApi
Returns the size of annotations- Specified by:
getAnnotationSize
in interfaceChartsApi
-
addAnnotation
public void addAnnotation(Annotation annotation)
Description copied from interface:ChartsApi
Add an annotation to the chart after render time. Note that this method should never be used when adding data synchronously at chart render time, as it adds expense to the calculations and rendering. When adding data at the same time as the chart is initiated, add the annotation as a configuration option instead.- Specified by:
addAnnotation
in interfaceChartsApi
-
setCaption
public void setCaption(String caption)
Description copied from interface:ChartsApi
Sets the chart caption.- Specified by:
setCaption
in interfaceChartsApi
-
setCaption
public void setCaption(Caption caption)
Description copied from interface:ChartsApi
Sets the Caption option.- Specified by:
setCaption
in interfaceChartsApi
-
getCaption
public Caption getCaption()
Description copied from interface:ChartsApi
Returns the Caption options, if any. Otherwise, create a new one.- Specified by:
getCaption
in interfaceChartsApi
- See Also:
Caption
-
getResponsive
public Responsive getResponsive()
Description copied from interface:ChartsApi
Returns a set of rules to apply for different screen or chart sizes. Each rule specifies additional chart options.- Specified by:
getResponsive
in interfaceChartsApi
-
setResponsive
public void setResponsive(Responsive responsive)
Description copied from interface:ChartsApi
Sets a set of rules to apply for different screen or chart sizes. Each rule specifies additional chart options.- Specified by:
setResponsive
in interfaceChartsApi
-
getEventsMap
public Map<String,org.zkoss.json.JavaScriptValue> getEventsMap()
Description copied from interface:ChartsApi
Returns a map of client side event listeners for the chart.- Specified by:
getEventsMap
in interfaceChartsApi
-
setEvents
public void setEvents(Map<String,org.zkoss.json.JavaScriptValue> events)
Description copied from interface:ChartsApi
Sets a map of client side event listeners for the chart.
-
addEvent
public void addEvent(String name, org.zkoss.json.JavaScriptValue event)
Description copied from interface:ChartsApi
Sets a client side event for the chart.
-
toggleSonify
public void toggleSonify()
Play/pause sonification of a chart.- Since:
- 11.2.0.0
-
-