Interface ChartsApi

  • All Known Implementing Classes:
    Charts, ChartsEngine

    public interface ChartsApi
    Charts' API interface.
    Since:
    3.0.2
    Author:
    rudyhuang
    • Method Detail

      • getAccessibility

        Accessibility getAccessibility()
        Returns options for configuring accessibility for the chart, or create a new one.

        Requires the accessibility module to be loaded. For example,

        
         Library.setProperty("org.zkoss.chart.modules.accessibility", "true");
         
        Since:
        10.2.1.0
      • setAccessibility

        void setAccessibility​(Accessibility accessibility)
        Sets options for configuring accessibility for the chart.

        Requires the accessibility module to be loaded. For example,

        
         Library.setProperty("org.zkoss.chart.modules.accessibility", "true");
         
        Since:
        10.2.1.0
      • getPlotData

        PlotData getPlotData()
        Returns the plot data which is a JSON object to collect all chart's options for Charts JS.
      • getData

        Data getData()
        Returns the data object.
        Since:
        11.2.0.0
      • getDrilldown

        Drilldown getDrilldown()
        Returns the drilldown object.
      • setColors

        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

        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

        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.
      • getClassName

        String getClassName()
        Returns a CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.
        Since:
        10.2.1.0
      • setClassName

        void setClassName​(String className)
        Sets a CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.
        Since:
        10.2.1.0
      • setTheme

        void setTheme​(Theme theme)
        Sets the theme options for all Charts in the same browser page.
      • getTheme

        Theme getTheme()
        Returns the global theme for all Charts.

        Default is null

      • getModel

        ChartsModel getModel()
        Returns the chart model associated with this chart, or null if this chart is not associated with any chart data model.
      • setModel

        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.
        Parameters:
        model - the chart model to associate, or null to dissociate any previous model.
        Throws:
        org.zkoss.zk.ui.UiException - if failed to initialize with the model
      • setModel

        void setModel​(org.zkoss.zul.ChartModel model)
      • setType

        void setType​(String type)
        Set the chart's type (Charts.PIE, Charts.BAR, Charts.LINE, etc.).

        Default: line.

      • getType

        String getType()
        Get the chart's type.

        Default: line.

      • setAlignTicks

        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 setting alignTicks to false. If the grid lines look messy, it's a good idea to hide them for the secondary axis by setting gridLineWidth to 0.
        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

        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 setting alignTicks to false. If the grid lines look messy, it's a good idea to hide them for the secondary axis by setting gridLineWidth to 0.

        Default: true.

        See Also:
        Chart.isAlignTicks()
      • setAnimation

        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, see SeriesPlotOptions.setAnimation(boolean).
        See Also:
        Chart.setAnimation(boolean), Animation
      • isAnimation

        boolean isAnimation()
        Returns whether enable the animation

        Default: true

      • setIgnoreHiddenSeries

        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.
        Parameters:
        ignoreHiddenSeries - if true, the axes will scale to the remaining visible series once one series is hidden
      • isIgnoreHiddenSeries

        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.

      • setBackgroundColor

        void setBackgroundColor​(String backgroundColor)
        Sets the background color for the outer chart area.
        Parameters:
        backgroundColor - the background color for the outer chart area
      • setBackgroundColor

        void setBackgroundColor​(LinearGradient gradient)
        Sets the background gradient for the outer chart area.
      • setBackgroundColor

        void setBackgroundColor​(RadialGradient gradient)
        Sets the background gradient for the outer chart area.
      • setBackgroundColor

        void setBackgroundColor​(Color color)
        Sets the background gradient for the outer chart area.
      • getBackgroundColor

        Color getBackgroundColor()
        Returns the background color for the outer chart area.

        Default: "#FFFFFF".

        See Also:
        Chart.getBackgroundColor()
      • setBorderColor

        void setBorderColor​(String borderColor)
        Sets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.
      • setBorderColor

        void setBorderColor​(LinearGradient borderColor)
        Sets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.
      • setBorderColor

        void setBorderColor​(RadialGradient borderColor)
        Sets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.
      • setBorderColor

        void setBorderColor​(Color borderColor)
        Sets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.
      • getBorderColor

        Color getBorderColor()
        Returns the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.

        Default: "#4572A7".

        See Also:
        Chart.getBorderColor()
      • setBorderRadius

        void setBorderRadius​(Number borderRadius)
        Sets the corner radius of the outer chart border. In export, the radius defaults to 0.

        Default: 5.

        Parameters:
        borderRadius - the corner radius of the outer chart border
        See Also:
        Chart.setBorderRadius(Number)
      • getBorderRadius

        Object getBorderRadius()
        Returns the corner radius of the outer chart border. In export, the radius defaults to 0.

        Default: 5.

        See Also:
        Chart.getBorderRadius()
      • setBorderWidth

        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.
        See Also:
        Chart.setBorderWidth(Number)
      • getBorderWidth

        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.

        See Also:
        Chart.getBorderWidth()
      • setWidth

        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.
        Parameters:
        width - an explicit width for the chart
        See Also:
        Chart.setWidth(Number)
      • getWidth

        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.

        See Also:
        Chart.getWidth()
      • setHeight

        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.
        Parameters:
        height - an explicit height for the chart
        See Also:
        Chart.setHeight(Number)
      • setHeight

        void setHeight​(String height)
        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.
        Since:
        7.2.1.0
      • getHeight

        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.

        See Also:
        Chart.getHeight()
      • setInverted

        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.
        See Also:
        Chart.setInverted(boolean)
      • isInverted

        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.

        See Also:
        Chart.isInverted()
      • setMargin

        void setMargin​(Number margin)
        Sets the margin between the outer edge of the chart and the plot area.
      • setMarginBottom

        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 also setSpacingBottom(Number).
        Parameters:
        marginBottom - the margin between the bottom outer edge of the chart and the plot area
        See Also:
        Chart.setMarginBottom(Number)
      • getMarginBottom

        Number getMarginBottom()
        Returns the margin between the bottom outer edge of the chart and the plot area.

        Default: null.

        See Also:
        Chart.getMarginBottom()
      • setMarginLeft

        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 also setSpacingLeft(Number)
        Parameters:
        marginLeft - the margin between the left outer edge of the chart and the plot area
        See Also:
        Chart.setMarginLeft(Number)
      • getMarginLeft

        Number getMarginLeft()
        Returns the margin between the left outer edge of the chart and the plot area.

        Default: null.

        See Also:
        Chart.getMarginLeft()
      • setMarginRight

        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 also setSpacingRight(Number).
        Parameters:
        marginRight - the margin between the right outer edge of the chart and the plot area
        See Also:
        Chart.setMarginRight(Number)
      • getMarginRight

        Number getMarginRight()
        Returns the margin between the right outer edge of the chart and the plot area.

        Default: null.

        See Also:
        Chart.getMarginRight()
      • setMarginTop

        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 also setSpacingTop(Number).
        Parameters:
        marginTop - the margin between the top outer edge of the chart and the plot area
        See Also:
        Chart.setMarginTop(Number)
      • getMarginTop

        Number getMarginTop()
        Returns the margin between the top outer edge of the chart and the plot area.

        Default: null.

        See Also:
        Chart.getMarginTop()
      • setPinchType

        void setPinchType​(String pinchType)
        Sets equivalent to setZoomType(String), but for multitouch gestures only. By default, the pinchType is the same as the zoomType 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.

        See Also:
        setZoomType(String), Chart.setPinchType(String)
      • getPinchType

        String getPinchType()
        Returns equivalent to getZoomType(), but for multitouch gestures only. By default, the pinchType is the same as the zoomType 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.

        See Also:
        Chart.getPinchType()
      • setPlotBackgroundColor

        void setPlotBackgroundColor​(String plotBackgroundColor)
        Sets the background color for the plot area.
      • setPlotBackgroundColor

        void setPlotBackgroundColor​(LinearGradient plotBackgroundColor)
        Sets the background color for the plot area.
      • setPlotBackgroundColor

        void setPlotBackgroundColor​(RadialGradient plotBackgroundColor)
        Sets the background color for the plot area.
      • setPlotBackgroundColor

        void setPlotBackgroundColor​(Color plotBackgroundColor)
        Sets the background color for the plot area.
      • setPlotBackgroundImage

        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.
        Parameters:
        plotBackgroundImage - the URL for an image to use as the plot background
        See Also:
        Chart.setPlotBackgroundImage(String)
      • setPlotBorderColor

        void setPlotBorderColor​(String plotBorderColor)
        Sets the color of the inner chart or plot area border.
      • setPlotBorderColor

        void setPlotBorderColor​(LinearGradient plotBorderColor)
        Sets the color of the inner chart or plot area border.
      • setPlotBorderColor

        void setPlotBorderColor​(RadialGradient plotBorderColor)
        Sets the color of the inner chart or plot area border.
      • setPlotBorderColor

        void setPlotBorderColor​(Color plotBorderColor)
        Sets the color of the inner chart or plot area border.
      • getPlotBorderColor

        Color getPlotBorderColor()
        Returns the color of the inner chart or plot area border.

        Default: "#C0C0C0".

        See Also:
        Chart.getPlotBorderColor()
      • setPlotBorderWidth

        void setPlotBorderWidth​(Number plotBorderWidth)
        Sets the pixel width of the plot area border.
        Parameters:
        plotBorderWidth - the pixel width of the plot area border
        See Also:
        Chart.setPlotBorderWidth(Number)
      • setPolar

        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.
        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

        boolean isPolar()
        Returns whether transforms into the polar coordinate system

        Default: false.

        See Also:
        Chart.isPolar()
      • setReflow

        void setReflow​(boolean reflow)
        Sets whether to reflow the chart to fit the width of the container div on resizing the window.
        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

        boolean isReflow()
        Returns whether to reflow the chart to fit the width of the container div on resizing the window.

        Default: true.

        See Also:
        Chart.isReflow()
      • getResetZoomButton

        ResetZoomButton getResetZoomButton()
        Returns the button that appears after a selection zoom, allowing the user to reset zoom.

        Default: null.

        Since:
        7.2.2.0
      • setResetZoomButton

        void setResetZoomButton​(ResetZoomButton resetZoomButton)
        Sets the button that appears after a selection zoom, allowing the user to reset zoom.
        Parameters:
        resetZoomButton - the button that appears after a selection zoom, allowing the user to reset zoom
        Since:
        7.2.2.0
      • getScrollablePlotArea

        ScrollablePlotArea getScrollablePlotArea()
        Returns the options for a scrollable plot area.

        Since:
        7.2.2.0
      • setScrollablePlotArea

        void setScrollablePlotArea​(ScrollablePlotArea scrollablePlotArea)
        Sets the options for a scrollable plot area.
        Since:
        7.2.2.0
      • setSelectionMarkerFill

        void setSelectionMarkerFill​(String selectionMarkerFill)
        Sets the background color of the marker square when selecting (zooming in on) an area of the chart.
      • setSelectionMarkerFill

        void setSelectionMarkerFill​(LinearGradient selectionMarkerFill)
        Sets the background color of the marker square when selecting (zooming in on) an area of the chart.
      • setSelectionMarkerFill

        void setSelectionMarkerFill​(RadialGradient selectionMarkerFill)
        Sets the background color of the marker square when selecting (zooming in on) an area of the chart.
      • setSelectionMarkerFill

        void setSelectionMarkerFill​(Color selectionMarkerFill)
        Sets the background color of the marker square when selecting (zooming in on) an area of the chart.
      • getSelectionMarkerFill

        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)".

        See Also:
        Chart.getSelectionMarkerFill()
      • setShadow

        void setShadow​(boolean shadow)
        Sets whether to apply a drop shadow to the outer chart area. Requires that backgroundColor be set.
        Parameters:
        shadow - whether to apply a drop shadow to the outer chart area
        See Also:
        Chart.setShadow(boolean)
      • isShadow

        boolean isShadow()
        Returns whether to apply a drop shadow to the outer chart area. Requires that backgroundColor be set.

        Default: false.

        See Also:
        Chart.isShadow()
      • setShowAxes

        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.
        Parameters:
        showAxes - whether to show the axes initially
        See Also:
        Chart.setShowAxes(boolean)
      • isShowAxes

        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.

        See Also:
        Chart.isShowAxes()
      • getSonification

        Sonification getSonification()
        Returns the sonification options, if any. Otherwise, create a new one.
        Since:
        11.2.0.0
      • setSonification

        void setSonification​(Sonification sonification)
        Sets the sonification options
        Since:
        11.2.0.0
      • getSpacing

        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].

      • setSpacingBottom

        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).

        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

        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.

        See Also:
        Chart.getSpacingBottom()
      • setSpacingLeft

        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).

        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

        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.

        See Also:
        Chart.getSpacingLeft()
      • setSpacingRight

        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).
        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

        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.

        See Also:
        Chart.getSpacingRight()
      • setSpacingTop

        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).
        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

        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.

        See Also:
        Chart.getSpacingTop()
      • setStyle

        void setStyle​(String style)
        Sets additional CSS styles to apply inline to the container div. 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)

        Parameters:
        style - one or many CSS key:value pairs in a single line string format
      • setStyle

        <K,​V> void setStyle​(Map<K,​V> style)
        Sets additional CSS styles to apply inline to the container div. 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);
         
        which will generate the final results like:
        
         {
             "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"
             }
         }
         
        Type Parameters:
        K - Type for the key, usually String
        V - Type for the value, usually String. For nested maps, use Object or any other type.
        Parameters:
        style - the style object
      • getStyle

        <K,​V> Map<K,​V> getStyle()
        Returns additional CSS styles to apply inline to the container div. 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
         

        Type Parameters:
        K - type for the key

        if style was set using setStyle(String), type will be String

        if style was set using setStyle(Map), type will be the same as the type from the key of the map

        if style was not set, default style will be applied, and type will be String

        V - type for the value

        if style was set using setStyle(String), type will be String

        if style was set using setStyle(Map), type will be the same as the type from the key of the map

        if style was not set, default style will be applied, and type will be String

      • isStyledMode

        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

        Since:
        10.2.1.0
      • setStyledMode

        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

        Since:
        10.2.1.0
      • setZoomType

        void setZoomType​(String zoomType)
        Sets decides in what dimentions the user can zoom by dragging the mouse. Can be one of x, y or xy.
        Parameters:
        zoomType - decides in what dimentions the user can zoom by dragging the mouse
        See Also:
        Chart.setZoomType(String)
      • getZoomType

        String getZoomType()
        Returns decides in what dimentions the user can zoom by dragging the mouse. Can be one of x, y or xy.

        Default: null.

        See Also:
        Chart.getZoomType()
      • getTooltip

        Tooltip getTooltip()
        Returns the Tooltip options, if any. Otherwise, create a new one.
        See Also:
        Tooltip
      • setTooltip

        void setTooltip​(Tooltip tooltip)
        Sets the Tooltip options
        Parameters:
        tooltip -
      • getChart

        Chart getChart()
        Returns the Chart options, if any. Otherwise, create a new one.
        See Also:
        Chart
      • setNoData

        void setNoData​(NoData noData)
        Sets the no-data options
        Since:
        1.1.0
      • getNoData

        NoData getNoData()
        Returns the no-data options
        Since:
        1.1.0
      • getExporting

        Exporting getExporting()
        Returns the Exporting options, if any. Otherwise, create a new one.
        See Also:
        Exporting
      • setExporting

        void setExporting​(Exporting exporting)
        Sets the Exporting options.
        See Also:
        Exporting
      • setCredits

        void setCredits​(Credits credits)
        Sets the Credits options
        Parameters:
        credits -
      • getCredits

        Credits getCredits()
        Returns the Credits options, if any. Otherwise, create a new one.
        See Also:
        Credits
      • setChart

        void setChart​(Chart chart)
        Sets the Chart options
        Parameters:
        chart -
      • getPane

        Pane getPane()
        Returns the pane at the index 0
      • getPane

        Pane getPane​(int index)
        Returns the pane from the given index
      • getPaneSize

        int getPaneSize()
        Returns the size of the pane list
      • getLegend

        Legend getLegend()
        Returns the Legend options, if any. Otherwise, create a new one.
        See Also:
        Legend
      • getLoading

        Loading getLoading()
        Returns the Loading options, if any. Otherwise, create a new one.
        See Also:
        Loading
      • setLegend

        void setLegend​(Legend legend)
        Sets the Legend options
        Parameters:
        legend -
      • getLabels

        Labels getLabels()
        Returns the labels options
      • setLabels

        void setLabels​(Labels labels)
        Sets the labels options
      • getLang

        Lang getLang()
        Returns the lang options
        Since:
        11.2.0.0
      • setLang

        void setLang​(Lang lang)
        Sets the lang options
        Since:
        11.2.0.0
      • setNavigation

        void setNavigation​(Navigation navigation)
        Sets the navigation options
      • getNavigation

        Navigation getNavigation()
        Returns the navigation options
      • getPlotOptions

        PlotOptions getPlotOptions()
        Returns the plotOptions option, if any. Otherwise, create a new one.
        See Also:
        PlotOptions
      • setPlotOptions

        void setPlotOptions​(PlotOptions plotOptions)
        Sets the plotOptions options
        Parameters:
        plotOptions -
      • getSeries

        Series getSeries()
        Returns the Series options, if any. Otherwise, create a new one.

        Returns the first series (index 0) by default.

        See Also:
        Series, getSeries(int)
      • addSeries

        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.
        Parameters:
        series -
      • addAxis

        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.
        Parameters:
        axis -
      • getSeriesSize

        int getSeriesSize()
        Returns the size of series
      • getSeries

        Series getSeries​(int index)
        Returns the Series options from the given index, if any. Otherwise, create a new one.
        See Also:
        Series
      • getXAxis

        XAxis getXAxis()
        Returns the XAxis options, if any. Otherwise, create a new one.

        Returns the first xAxis (index 0) by default.

        See Also:
        XAxis, getXAxis(int)
      • getXAxis

        XAxis getXAxis​(int index)
        Returns the XAxis options from the given index, if any. Otherwise, create a new one.
        See Also:
        XAxis
      • getXAxisSize

        int getXAxisSize()
        Returns the size of xAxis
      • setXAxis

        void setXAxis​(XAxis xaxis)
        Sets the xAxis with out putting it in an Array
      • getYAxis

        YAxis getYAxis()
        Returns the YAxis options, if any. Otherwise, create a new one.

        Returns the first yAxis (index 0) by default.

        See Also:
        YAxis, getYAxis(int)
      • getYAxis

        YAxis getYAxis​(int index)
        Returns the YAxis options from the given index, if any. Otherwise, create a new one.
        See Also:
        YAxis
      • getyAxisSize

        int getyAxisSize()
        Deprecated.
        As of release 10.2.1.0, using getYAxisSize()
        Returns the size of yAxis
      • getYAxisSize

        int getYAxisSize()
        Returns the size of yAxis
        Since:
        10.2.1.0
      • setYAxis

        void setYAxis​(YAxis yaxis)
        Sets the yAxis with out putting it in an Array
      • getZAxis

        ZAxis getZAxis()
        Returns the ZAxis options, if any. Otherwise, create a new one.

        Returns the first zAxis (index 0) by default.

        See Also:
        ZAxis, getZAxis(int)
      • getZAxis

        ZAxis getZAxis​(int index)
        Returns the ZAxis options from the given index, if any. Otherwise, create a new one.
        See Also:
        ZAxis
      • getzAxisSize

        int getzAxisSize()
        Returns the size of zAxis
      • setZAxis

        void setZAxis​(ZAxis zaxis)
        Sets the zAxis with out putting it in an Array
      • getOptions3D

        Options3D getOptions3D()
        Returns the options to render charts in 3 dimensions.

        Default: null.

      • setOptions3D

        void setOptions3D​(Options3D options3D)
        Sets the options to render charts in 3 dimensions.
        Parameters:
        options3D - the options to render charts in 3 dimensions.
      • getColorAxis

        ColorAxis getColorAxis()
        Returns the ColorAxis options, if any. Otherwise, create a new one.

        Returns the first colorAxis (index 0) by default.

        See Also:
        ColorAxis, getColorAxis(int)
      • getColorAxis

        ColorAxis getColorAxis​(int index)
        Returns the ColorAxis options from the given index, if any. Otherwise, create a new one.

        Since:
        7.2.1.0
        See Also:
        ColorAxis, getColorAxis()
      • setTitle

        void setTitle​(String title)
        Sets the chart title.
      • setTitle

        void setTitle​(Title title)
        Sets the Title options
        Parameters:
        title -
      • getTitle

        Title getTitle()
        Returns the Title options, if any. Otherwise, create a new one.
        See Also:
        Title
      • getSubtitle

        Subtitle getSubtitle()
        Returns the Subtitle options, if any. Otherwise, create a new one.
        See Also:
        Subtitle
      • setSubtitle

        void setSubtitle​(String subtitle)
        Sets the chart subtitle
        Parameters:
        subtitle -
      • setSubtitle

        void setSubtitle​(Subtitle subtitle)
        Sets the Subtitle options
        Parameters:
        subtitle -
      • setEnableZoomSelection

        void setEnableZoomSelection​(boolean enableZoomSelection)
        Sets whether selection event will zoom the chart to the selected area.
        See Also:
        Chart.setEnableZoomSelection(boolean)
      • isEnableZoomSelection

        boolean isEnableZoomSelection()
        Returns whether selection event will zoom the chart to the selected area.

        Default: true.

        See Also:
        Chart.isEnableZoomSelection()
      • getAnnotation

        Annotation getAnnotation()
        Returns the Annotation options, if any. Otherwise, create a new one.

        Returns the first annotation (index 0) by default.

        Since:
        7.2.1.0
        See Also:
        Annotation, getAnnotation(int)
      • getAnnotation

        Annotation getAnnotation​(int index)
        Returns the Annotation options from the given index, if any. Otherwise, create a new one.

        Parameters:
        index -
        Since:
        7.2.1.0
        See Also:
        Annotation
      • getAnnotationSize

        int getAnnotationSize()
        Returns the size of annotations
        Since:
        7.2.1.0
      • addAnnotation

        void addAnnotation​(Annotation annotation)
        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.
        Parameters:
        annotation -
        Since:
        7.2.1.0
      • setCaption

        void setCaption​(String caption)
        Sets the chart caption.
        Since:
        7.2.1.0
      • setCaption

        void setCaption​(Caption caption)
        Sets the Caption option.
        Since:
        7.2.1.0
      • getCaption

        Caption getCaption()
        Returns the Caption options, if any. Otherwise, create a new one.
        Since:
        7.2.1.0
        See Also:
        Caption
      • getResponsive

        Responsive getResponsive()
        Returns a set of rules to apply for different screen or chart sizes. Each rule specifies additional chart options.
        Since:
        7.2.1.0
      • getPanKey

        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

        Since:
        10.2.1.0
      • setPanKey

        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).
        Since:
        10.2.1.0
      • isPanning

        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

        Since:
        10.2.1.0
      • setPanning

        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.
        Since:
        10.2.1.0
      • getParallelAxes

        ParallelAxes getParallelAxes()
        Returns common options for all yAxes rendered in a parallel coordinates plot, if any. Otherwise, create a new one.
        Since:
        10.2.1.0
      • setParallelAxes

        void setParallelAxes​(ParallelAxes parallelAxes)
        Sets common options for all yAxes rendered in a parallel coordinates plot.
        Since:
        10.2.1.0
      • isParallelCoordinates

        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

        Since:
        10.2.1.0
      • setParallelCoordinates

        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.
        Since:
        10.2.1.0
      • setResponsive

        void setResponsive​(Responsive responsive)
        Sets a set of rules to apply for different screen or chart sizes. Each rule specifies additional chart options.
        Since:
        7.2.1.0
      • getEventsMap

        Map<String,​org.zkoss.json.JavaScriptValue> getEventsMap()
        Returns a map of client side event listeners for the chart.
        Since:
        7.2.2.0
      • setEvents

        void setEvents​(Map<String,​org.zkoss.json.JavaScriptValue> events)
        Sets a map of client side event listeners for the chart.
        Since:
        7.2.2.0
      • addEvent

        void addEvent​(String name,
                      org.zkoss.json.JavaScriptValue event)
        Sets a client side event for the chart.
        Since:
        7.2.2.0