Class ChartsEngine
- java.lang.Object
-
- org.zkoss.chart.ChartsEngine
-
- All Implemented Interfaces:
Serializable,ChartsApi
public class ChartsEngine extends Object implements ChartsApi, Serializable
An engine ofCharts. Does not need a ZK execution to work. It is used mainly to generate options as JSON format for Highcharts Export Server. Typical usage:ChartsEngine chart = new ChartsEngine(); chart.setTitle("Monthly Average Temperature"); chart.setSubTitle("Source: WorldClimate.com"); chart.setType(Charts.LINE); chart.setTheme(Theme.DEFAULT); chart.setModel(model); chart.getXAxis().setCategories(Arrays.asList(new String[]{ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" })); chart.getYAxis().getTitle().setText("Temperature (°C)"); return chart.toJSON(); // {"xAxis":{}...}- Since:
- 3.0.2
- Author:
- rudyhuang
- See Also:
toJSON(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ChartsEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnnotation(Annotation annotation)Add an annotation to the chart after render time.voidaddAxis(Axis axis)Add an axis to the chart after render time.voidaddEvent(String name, org.zkoss.json.JavaScriptValue event)Sets a client side event for the chart.voidaddSeries(Series series)Add a series to the chart after render time.AccessibilitygetAccessibility()Returns options for configuring accessibility for the chart, or create a new one.AnnotationgetAnnotation()Returns the Annotation options, if any.AnnotationgetAnnotation(int index)Returns the Annotation options from the given index, if any.intgetAnnotationSize()Returns the size of annotationsColorgetBackgroundColor()Returns the background color for the outer chart area.ColorgetBorderColor()Returns the color of the outer chart border.ObjectgetBorderRadius()Returns the corner radius of the outer chart border.NumbergetBorderWidth()Returns the pixel width of the outer chart border.CaptiongetCaption()Returns the Caption options, if any.ChartgetChart()Returns the Chart options, if any.StringgetClassName()Returns a CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.ColorAxisgetColorAxis()Returns the ColorAxis options, if any.ColorAxisgetColorAxis(int index)Returns the ColorAxis options from the given index, if any.List<Color>getColors()Returns the default colors for the chart's series.CreditsgetCredits()Returns the Credits options, if any.DatagetData()Returns the data object.DrilldowngetDrilldown()Returns the drilldown object.Map<String,org.zkoss.json.JavaScriptValue>getEventsMap()Returns a map of client side event listeners for the chart.ExportinggetExporting()Returns the Exporting options, if any.NumbergetHeight()Returns an explicit height for the chart.LabelsgetLabels()Returns the labels optionsLanggetLang()Returns the lang optionsLegendgetLegend()Returns the Legend options, if any.LoadinggetLoading()Returns the Loading options, if any.Number[]getMargin()Returns the margin between the outer edge of the chart and the plot area.NumbergetMarginBottom()Returns the margin between the bottom outer edge of the chart and the plot area.NumbergetMarginLeft()Returns the margin between the left outer edge of the chart and the plot area.NumbergetMarginRight()Returns the margin between the right outer edge of the chart and the plot area.NumbergetMarginTop()Returns the margin between the top outer edge of the chart and the plot area.ChartsModelgetModel()Returns the chart model associated with this chart, or null if this chart is not associated with any chart data model.NavigationgetNavigation()Returns the navigation optionsNoDatagetNoData()Returns the no-data optionsOptions3DgetOptions3D()Returns the options to render charts in 3 dimensions.PanegetPane()Returns the pane at the index 0PanegetPane(int index)Returns the pane from the given indexintgetPaneSize()Returns the size of the pane listStringgetPanKey()Returns setting a key to switch between zooming and panning.ParallelAxesgetParallelAxes()Returns common options for all yAxes rendered in a parallel coordinates plot, if any.StringgetPinchType()Returns equivalent toChartsApi.getZoomType(), but for multitouch gestures only.ColorgetPlotBackgroundColor()Returns the background color for the plot area.StringgetPlotBackgroundImage()Returns the URL for an image to use as the plot background.ColorgetPlotBorderColor()Returns the color of the inner chart or plot area border.NumbergetPlotBorderWidth()Returns the pixel width of the plot area border.PlotDatagetPlotData()Returns the plot data which is a JSON object to collect all chart's options for Charts JS.PlotOptionsgetPlotOptions()Returns the plotOptions option, if any.ResetZoomButtongetResetZoomButton()Returns the button that appears after a selection zoom, allowing the user to reset zoom.ResponsivegetResponsive()Returns a set of rules to apply for different screen or chart sizes.ScrollablePlotAreagetScrollablePlotArea()Returns the options for a scrollable plot area.ColorgetSelectionMarkerFill()Returns the background color of the marker square when selecting (zooming in on) an area of the chart.SeriesgetSeries()Returns the Series options, if any.SeriesgetSeries(int index)Returns the Series options from the given index, if any.intgetSeriesSize()Returns the size of seriesSonificationgetSonification()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.NumbergetSpacingBottom()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).NumbergetSpacingLeft()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).NumbergetSpacingRight()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).NumbergetSpacingTop()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.SubtitlegetSubtitle()Returns the Subtitle options, if any.ThemegetTheme()Returns the global theme for all Charts.TitlegetTitle()Returns the Title options, if any.TooltipgetTooltip()Returns the Tooltip options, if any.StringgetType()Get the chart's type.NumbergetWidth()Returns an explicit width for the chart.XAxisgetXAxis()Returns the XAxis options, if any.XAxisgetXAxis(int index)Returns the XAxis options from the given index, if any.intgetXAxisSize()Returns the size of xAxisYAxisgetYAxis()Returns the YAxis options, if any.YAxisgetYAxis(int index)Returns the YAxis options from the given index, if any.intgetyAxisSize()Returns the size of yAxisintgetYAxisSize()Returns the size of yAxisZAxisgetZAxis()Returns the ZAxis options, if any.ZAxisgetZAxis(int index)Returns the ZAxis options from the given index, if any.intgetzAxisSize()Returns the size of zAxisStringgetZoomType()Returns decides in what dimentions the user can zoom by dragging the mouse.booleanisAlignTicks()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.booleanisAnimation()Returns whether enable the animationbooleanisEnableZoomSelection()Returns whether selection event will zoom the chart to the selected area.booleanisIgnoreHiddenSeries()Returns if true, the axes will scale to the remaining visible series once one series is hidden.booleanisInverted()Returns whether to invert the axes so that the x axis is vertical and y axis is horizontal.booleanisPanning()Returns if allow panning in a chart.booleanisParallelCoordinates()Returns a flag to render charts as a parallel coordinates plot.booleanisPlotShadow()Returns whether to apply a drop shadow to the plot area.booleanisPolar()Returns whether transforms into the polar coordinate systembooleanisReflow()Returns whether to reflow the chart to fit the width of the container div on resizing the window.booleanisShadow()Returns whether to apply a drop shadow to the outer chart area.booleanisShowAxes()Returns whether to show the axes initially.booleanisStyledMode()Returns whether to apply styled mode.voidsetAccessibility(Accessibility accessibility)Sets options for configuring accessibility for the chart.voidsetAlignTicks(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.voidsetAnimation(boolean animation)Animation can be disabled throughout the chart by setting it to false here.voidsetBackgroundColor(String backgroundColor)Sets the background color for the outer chart area.voidsetBackgroundColor(Color color)Sets the background gradient for the outer chart area.voidsetBackgroundColor(LinearGradient gradient)Sets the background gradient for the outer chart area.voidsetBackgroundColor(RadialGradient gradient)Sets the background gradient for the outer chart area.voidsetBorderColor(String borderColor)Sets the color of the outer chart border.voidsetBorderColor(Color borderColor)Sets the color of the outer chart border.voidsetBorderColor(LinearGradient borderColor)Sets the color of the outer chart border.voidsetBorderColor(RadialGradient borderColor)Sets the color of the outer chart border.voidsetBorderRadius(Number borderRadius)Sets the corner radius of the outer chart border.voidsetBorderWidth(Number borderWidth)Sets the pixel width of the outer chart border.voidsetCaption(String caption)Sets the chart caption.voidsetCaption(Caption caption)Sets the Caption option.voidsetChart(Chart chart)Sets the Chart optionsvoidsetClassName(String className)Sets a CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.voidsetColors(String... source)Sets the default colors for the chart's series.voidsetColors(List<Color> colors)Sets the default colors for the chart's series.voidsetCredits(Credits credits)Sets the Credits optionsvoidsetEnableZoomSelection(boolean enableZoomSelection)Sets whether selection event will zoom the chart to the selected area.voidsetEvents(Map<String,org.zkoss.json.JavaScriptValue> events)Sets a map of client side event listeners for the chart.voidsetExporting(Exporting exporting)Sets the Exporting options.voidsetHeight(Number height)Sets an explicit height for the chart.voidsetHeight(String height)Sets an explicit height for the chart.voidsetIgnoreHiddenSeries(boolean ignoreHiddenSeries)Sets to ignore the hidden series, if true, the axes will scale to the remaining visible series once one series is hidden.voidsetInverted(boolean inverted)Sets whether to invert the axes so that the x axis is vertical and y axis is horizontal.voidsetLabels(Labels labels)Sets the labels optionsvoidsetLang(Lang lang)Sets the lang optionsvoidsetLegend(Legend legend)Sets the Legend optionsvoidsetMargin(Number margin)Sets the margin between the outer edge of the chart and the plot area.voidsetMargin(Number[] margin)Sets the margin between the outer edge of the chart and the plot area.voidsetMargin(String margins)Sets the margin between the outer edge of the chart and the plot area.voidsetMarginBottom(Number marginBottom)Sets the margin between the bottom outer edge of the chart and the plot area.voidsetMarginLeft(Number marginLeft)Sets the margin between the left outer edge of the chart and the plot area.voidsetMarginRight(Number marginRight)Sets the margin between the right outer edge of the chart and the plot area.voidsetMarginTop(Number marginTop)Sets the margin between the top outer edge of the chart and the plot area.voidsetModel(ChartsModel model)Sets the chart model associated with this chart.voidsetModel(org.zkoss.zul.ChartModel model)voidsetNavigation(Navigation navigation)Sets the navigation optionsvoidsetNoData(NoData noData)Sets the no-data optionsvoidsetOptions3D(Options3D options3D)Sets the options to render charts in 3 dimensions.voidsetPanKey(String panKey)Sets setting a key to switch between zooming and panning.voidsetPanning(boolean panning)Sets if allow panning in a chart.voidsetParallelAxes(ParallelAxes parallelAxes)Sets common options for all yAxes rendered in a parallel coordinates plot.voidsetParallelCoordinates(boolean parallelCoordinates)Sets a flag to render charts as a parallel coordinates plot.voidsetPinchType(String pinchType)Sets equivalent toChartsApi.setZoomType(String), but for multitouch gestures only.voidsetPlotBackgroundColor(String plotBackgroundColor)Sets the background color for the plot area.voidsetPlotBackgroundColor(Color plotBackgroundColor)Sets the background color for the plot area.voidsetPlotBackgroundColor(LinearGradient plotBackgroundColor)Sets the background color for the plot area.voidsetPlotBackgroundColor(RadialGradient plotBackgroundColor)Sets the background color for the plot area.voidsetPlotBackgroundImage(String plotBackgroundImage)Sets the URL for an image to use as the plot background.voidsetPlotBorderColor(String plotBorderColor)Sets the color of the inner chart or plot area border.voidsetPlotBorderColor(Color plotBorderColor)Sets the color of the inner chart or plot area border.voidsetPlotBorderColor(LinearGradient plotBorderColor)Sets the color of the inner chart or plot area border.voidsetPlotBorderColor(RadialGradient plotBorderColor)Sets the color of the inner chart or plot area border.voidsetPlotBorderWidth(Number plotBorderWidth)Sets the pixel width of the plot area border.voidsetPlotOptions(PlotOptions plotOptions)Sets the plotOptions optionsvoidsetPlotShadow(boolean plotShadow)Sets whether to apply a drop shadow to the plot area.voidsetPolar(boolean polar)Sets to true to enable the cartesian charts like line, spline, area and column are transformed into the polar coordinate system.voidsetReflow(boolean reflow)Sets whether to reflow the chart to fit the width of the container div on resizing the window.voidsetResetZoomButton(ResetZoomButton resetZoomButton)Sets the button that appears after a selection zoom, allowing the user to reset zoom.voidsetResponsive(Responsive responsive)Sets a set of rules to apply for different screen or chart sizes.voidsetScrollablePlotArea(ScrollablePlotArea scrollablePlotArea)Sets the options for a scrollable plot area.voidsetSelectionMarkerFill(String selectionMarkerFill)Sets the background color of the marker square when selecting (zooming in on) an area of the chart.voidsetSelectionMarkerFill(Color selectionMarkerFill)Sets the background color of the marker square when selecting (zooming in on) an area of the chart.voidsetSelectionMarkerFill(LinearGradient selectionMarkerFill)Sets the background color of the marker square when selecting (zooming in on) an area of the chart.voidsetSelectionMarkerFill(RadialGradient selectionMarkerFill)Sets the background color of the marker square when selecting (zooming in on) an area of the chart.voidsetShadow(boolean shadow)Sets whether to apply a drop shadow to the outer chart area.voidsetShowAxes(boolean showAxes)Sets whether to show the axes initially.voidsetSonification(Sonification sonification)Sets the sonification optionsvoidsetSpacing(Number[] spacing)Sets the distance between the outer edge of the chart and the content, like title, legend, axis title or labels.voidsetSpacing(String spacings)Sets the distance between the outer edge of the chart and the content, like title, legend, axis title or labels.voidsetSpacingBottom(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).voidsetSpacingLeft(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).voidsetSpacingRight(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).voidsetSpacingTop(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).voidsetStyle(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.voidsetStyledMode(boolean styledMode)Sets whether to apply styled mode.voidsetSubtitle(String subtitle)Sets the chart subtitlevoidsetSubtitle(Subtitle subtitle)Sets the Subtitle optionsvoidsetTheme(Theme theme)Sets the theme options for all Charts in the same browser page.voidsetTitle(String title)Sets the chart title.voidsetTitle(Title title)Sets the Title optionsvoidsetTooltip(Tooltip tooltip)Sets the Tooltip optionsvoidsetType(String type)Set the chart's type (Charts.PIE, Charts.BAR, Charts.LINE, etc.).voidsetWidth(Number width)Sets an explicit width for the chart.voidsetWidth(String width)Sets an explicit width for the chart.voidsetXAxis(XAxis xaxis)Sets the xAxis with out putting it in an ArrayvoidsetYAxis(YAxis yaxis)Sets the yAxis with out putting it in an ArrayvoidsetZAxis(ZAxis zaxis)Sets the zAxis with out putting it in an ArrayvoidsetZoomType(String zoomType)Sets decides in what dimentions the user can zoom by dragging the mouse.protected voidsmartDrawChart()mark a draw flag to inform that this Chart needs update.StringtoJSON()Gets the JSON result.
-
-
-
Method Detail
-
getPlotData
public PlotData getPlotData()
Description copied from interface:ChartsApiReturns the plot data which is a JSON object to collect all chart's options for Charts JS.- Specified by:
getPlotDatain interfaceChartsApi
-
getDrilldown
public Drilldown getDrilldown()
Description copied from interface:ChartsApiReturns the drilldown object.- Specified by:
getDrilldownin interfaceChartsApi
-
setColors
public void setColors(List<Color> colors)
Description copied from interface:ChartsApiSets 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)
Description copied from interface:ChartsApiSets 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()
Description copied from interface:ChartsApiReturns the default colors for the chart's series. When all colors are used, new colors are pulled from the start again.
-
getClassName
public String getClassName()
Description copied from interface:ChartsApiReturns a CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.- Specified by:
getClassNamein interfaceChartsApi
-
setClassName
public void setClassName(String className)
Description copied from interface:ChartsApiSets a CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.- Specified by:
setClassNamein interfaceChartsApi
-
setTheme
public void setTheme(Theme theme)
Description copied from interface:ChartsApiSets the theme options for all Charts in the same browser page.
-
getTheme
public Theme getTheme()
Description copied from interface:ChartsApiReturns the global theme for all Charts.Default is null
-
getModel
public ChartsModel getModel()
Description copied from interface:ChartsApiReturns 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)
Description copied from interface:ChartsApiSets 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)
-
setType
public void setType(String type)
Description copied from interface:ChartsApiSet the chart's type (Charts.PIE, Charts.BAR, Charts.LINE, etc.).Default: line.
-
getType
public String getType()
Description copied from interface:ChartsApiGet the chart's type.Default: line.
-
setAlignTicks
public void setAlignTicks(boolean alignTicks)
Description copied from interface:ChartsApiSets 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 settingalignTicksto false. If the grid lines look messy, it's a good idea to hide them for the secondary axis by settinggridLineWidthto 0.- Specified by:
setAlignTicksin 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()
Description copied from interface:ChartsApiReturns 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 settingalignTicksto false. If the grid lines look messy, it's a good idea to hide them for the secondary axis by settinggridLineWidthto 0.Default: true.
- Specified by:
isAlignTicksin interfaceChartsApi- See Also:
Chart.isAlignTicks()
-
getAccessibility
public Accessibility getAccessibility()
Description copied from interface:ChartsApiReturns 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");- Specified by:
getAccessibilityin interfaceChartsApi
-
setAccessibility
public void setAccessibility(Accessibility accessibility)
Description copied from interface:ChartsApiSets options for configuring accessibility for the chart.Requires the accessibility module to be loaded. For example,
Library.setProperty("org.zkoss.chart.modules.accessibility", "true");- Specified by:
setAccessibilityin interfaceChartsApi
-
setAnimation
public void setAnimation(boolean animation)
Description copied from interface:ChartsApiAnimation 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:
setAnimationin interfaceChartsApi- See Also:
Chart.setAnimation(boolean),Animation
-
isAnimation
public boolean isAnimation()
Description copied from interface:ChartsApiReturns whether enable the animationDefault: true
- Specified by:
isAnimationin interfaceChartsApi
-
setIgnoreHiddenSeries
public void setIgnoreHiddenSeries(boolean ignoreHiddenSeries)
Description copied from interface:ChartsApiSets 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:
setIgnoreHiddenSeriesin interfaceChartsApi- Parameters:
ignoreHiddenSeries- if true, the axes will scale to the remaining visible series once one series is hidden
-
isIgnoreHiddenSeries
public boolean isIgnoreHiddenSeries()
Description copied from interface:ChartsApiReturns 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:
isIgnoreHiddenSeriesin interfaceChartsApi
-
setBackgroundColor
public void setBackgroundColor(String backgroundColor)
Description copied from interface:ChartsApiSets the background color for the outer chart area.- Specified by:
setBackgroundColorin interfaceChartsApi- Parameters:
backgroundColor- the background color for the outer chart area
-
setBackgroundColor
public void setBackgroundColor(LinearGradient gradient)
Description copied from interface:ChartsApiSets the background gradient for the outer chart area.- Specified by:
setBackgroundColorin interfaceChartsApi
-
setBackgroundColor
public void setBackgroundColor(RadialGradient gradient)
Description copied from interface:ChartsApiSets the background gradient for the outer chart area.- Specified by:
setBackgroundColorin interfaceChartsApi
-
setBackgroundColor
public void setBackgroundColor(Color color)
Description copied from interface:ChartsApiSets the background gradient for the outer chart area.- Specified by:
setBackgroundColorin interfaceChartsApi
-
getBackgroundColor
public Color getBackgroundColor()
Description copied from interface:ChartsApiReturns the background color for the outer chart area.Default: "#FFFFFF".
- Specified by:
getBackgroundColorin interfaceChartsApi- See Also:
Chart.getBackgroundColor()
-
setBorderColor
public void setBorderColor(String borderColor)
Description copied from interface:ChartsApiSets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.- Specified by:
setBorderColorin interfaceChartsApi
-
setBorderColor
public void setBorderColor(LinearGradient borderColor)
Description copied from interface:ChartsApiSets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.- Specified by:
setBorderColorin interfaceChartsApi
-
setBorderColor
public void setBorderColor(RadialGradient borderColor)
Description copied from interface:ChartsApiSets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.- Specified by:
setBorderColorin interfaceChartsApi
-
setBorderColor
public void setBorderColor(Color borderColor)
Description copied from interface:ChartsApiSets the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.- Specified by:
setBorderColorin interfaceChartsApi
-
getBorderColor
public Color getBorderColor()
Description copied from interface:ChartsApiReturns the color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.Default: "#4572A7".
- Specified by:
getBorderColorin interfaceChartsApi- See Also:
Chart.getBorderColor()
-
setBorderRadius
public void setBorderRadius(Number borderRadius)
Description copied from interface:ChartsApiSets the corner radius of the outer chart border. In export, the radius defaults to 0.Default: 5.
- Specified by:
setBorderRadiusin interfaceChartsApi- Parameters:
borderRadius- the corner radius of the outer chart border- See Also:
Chart.setBorderRadius(Number)
-
getBorderRadius
public Object getBorderRadius()
Description copied from interface:ChartsApiReturns the corner radius of the outer chart border. In export, the radius defaults to 0.Default: 5.
- Specified by:
getBorderRadiusin interfaceChartsApi- See Also:
Chart.getBorderRadius()
-
setBorderWidth
public void setBorderWidth(Number borderWidth)
Description copied from interface:ChartsApiSets the pixel width of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.- Specified by:
setBorderWidthin interfaceChartsApi- See Also:
Chart.setBorderWidth(Number)
-
getBorderWidth
public Number getBorderWidth()
Description copied from interface:ChartsApiReturns the pixel width of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners.Default: 0.
- Specified by:
getBorderWidthin interfaceChartsApi- See Also:
Chart.getBorderWidth()
-
setWidth
public void setWidth(Number width)
Description copied from interface:ChartsApiSets an explicit width for the chart. By default the width is calculated from the offset width of the containing element.- Specified by:
setWidthin interfaceChartsApi- Parameters:
width- an explicit width for the chart- See Also:
Chart.setWidth(Number)
-
setWidth
public void setWidth(String width)
Description copied from interface:ChartsApiSets an explicit width for the chart. By default the width is calculated from the offset width of the containing element. Note: Percentage values (e.g., "100%") are not supported.- Specified by:
setWidthin interfaceChartsApi- Parameters:
width- an explicit width for the chart- See Also:
Chart.setWidth(String)
-
getWidth
public Number getWidth()
Description copied from interface:ChartsApiReturns an explicit width for the chart. By default the width is calculated from the offset width of the containing element.Default: null.
- Specified by:
getWidthin interfaceChartsApi- See Also:
Chart.getWidth()
-
setHeight
public void setHeight(Number height)
Description copied from interface:ChartsApiSets 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:
setHeightin interfaceChartsApi- Parameters:
height- an explicit height for the chart- See Also:
Chart.setHeight(Number)
-
setHeight
public void setHeight(String height)
Description copied from interface:ChartsApiSets 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()
Description copied from interface:ChartsApiReturns 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:
getHeightin interfaceChartsApi- See Also:
Chart.getHeight()
-
setInverted
public void setInverted(boolean inverted)
Description copied from interface:ChartsApiSets 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:
setInvertedin interfaceChartsApi- See Also:
Chart.setInverted(boolean)
-
isInverted
public boolean isInverted()
Description copied from interface:ChartsApiReturns 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:
isInvertedin interfaceChartsApi- See Also:
Chart.isInverted()
-
setMargin
public void setMargin(String margins)
Description copied from interface:ChartsApiSets 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 ofChartsApi.setMarginTop(Number),ChartsApi.setMarginRight(Number),ChartsApi.setMarginBottom(Number)andChartsApi.setMarginLeft(Number)for shorthand setting of one option.Default: null.
- Specified by:
setMarginin interfaceChartsApi- See Also:
ChartsApi.setMargin(Number[])
-
setMargin
public void setMargin(Number margin)
Description copied from interface:ChartsApiSets the margin between the outer edge of the chart and the plot area.
-
setMargin
public void setMargin(Number[] margin)
Description copied from interface:ChartsApiSets 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 ofChartsApi.setMarginTop(Number),ChartsApi.setMarginRight(Number),ChartsApi.setMarginBottom(Number)andChartsApi.setMarginLeft(Number)for shorthand setting of one option.Default: null.
- Specified by:
setMarginin interfaceChartsApi- See Also:
ChartsApi.setMargin(String),Chart.setMargin(Number[])
-
getMargin
public Number[] getMargin()
Description copied from interface:ChartsApiReturns 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 ofChartsApi.setMarginTop(Number),ChartsApi.setMarginRight(Number),ChartsApi.setMarginBottom(Number)andChartsApi.setMarginLeft(Number)for shorthand setting of one option.Default: null.
- Specified by:
getMarginin interfaceChartsApi- See Also:
Chart.getMargin()
-
setMarginBottom
public void setMarginBottom(Number marginBottom)
Description copied from interface:ChartsApiSets 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 alsoChartsApi.setSpacingBottom(Number).- Specified by:
setMarginBottomin 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()
Description copied from interface:ChartsApiReturns the margin between the bottom outer edge of the chart and the plot area.Default: null.
- Specified by:
getMarginBottomin interfaceChartsApi- See Also:
Chart.getMarginBottom()
-
setMarginLeft
public void setMarginLeft(Number marginLeft)
Description copied from interface:ChartsApiSets 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 alsoChartsApi.setSpacingLeft(Number)- Specified by:
setMarginLeftin 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()
Description copied from interface:ChartsApiReturns the margin between the left outer edge of the chart and the plot area.Default: null.
- Specified by:
getMarginLeftin interfaceChartsApi- See Also:
Chart.getMarginLeft()
-
setMarginRight
public void setMarginRight(Number marginRight)
Description copied from interface:ChartsApiSets 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 alsoChartsApi.setSpacingRight(Number).- Specified by:
setMarginRightin 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()
Description copied from interface:ChartsApiReturns the margin between the right outer edge of the chart and the plot area.Default: null.
- Specified by:
getMarginRightin interfaceChartsApi- See Also:
Chart.getMarginRight()
-
setMarginTop
public void setMarginTop(Number marginTop)
Description copied from interface:ChartsApiSets 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 alsoChartsApi.setSpacingTop(Number).- Specified by:
setMarginTopin 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()
Description copied from interface:ChartsApiReturns the margin between the top outer edge of the chart and the plot area.Default: null.
- Specified by:
getMarginTopin interfaceChartsApi- See Also:
Chart.getMarginTop()
-
setPinchType
public void setPinchType(String pinchType)
Description copied from interface:ChartsApiSets equivalent toChartsApi.setZoomType(String), but for multitouch gestures only. By default, thepinchTypeis the same as thezoomTypesetting. 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:
setPinchTypein interfaceChartsApi- See Also:
ChartsApi.setZoomType(String),Chart.setPinchType(String)
-
getPinchType
public String getPinchType()
Description copied from interface:ChartsApiReturns equivalent toChartsApi.getZoomType(), but for multitouch gestures only. By default, thepinchTypeis the same as thezoomTypesetting. 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:
getPinchTypein interfaceChartsApi- See Also:
Chart.getPinchType()
-
setPlotBackgroundColor
public void setPlotBackgroundColor(String plotBackgroundColor)
Description copied from interface:ChartsApiSets the background color for the plot area.- Specified by:
setPlotBackgroundColorin interfaceChartsApi
-
setPlotBackgroundColor
public void setPlotBackgroundColor(LinearGradient plotBackgroundColor)
Description copied from interface:ChartsApiSets the background color for the plot area.- Specified by:
setPlotBackgroundColorin interfaceChartsApi
-
setPlotBackgroundColor
public void setPlotBackgroundColor(RadialGradient plotBackgroundColor)
Description copied from interface:ChartsApiSets the background color for the plot area.- Specified by:
setPlotBackgroundColorin interfaceChartsApi
-
setPlotBackgroundColor
public void setPlotBackgroundColor(Color plotBackgroundColor)
Description copied from interface:ChartsApiSets the background color for the plot area.- Specified by:
setPlotBackgroundColorin interfaceChartsApi
-
getPlotBackgroundColor
public Color getPlotBackgroundColor()
Description copied from interface:ChartsApiReturns the background color for the plot area.Default: null.
- Specified by:
getPlotBackgroundColorin interfaceChartsApi- See Also:
Chart.getPlotBackgroundColor()
-
setPlotBackgroundImage
public void setPlotBackgroundImage(String plotBackgroundImage)
Description copied from interface:ChartsApiSets 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:
setPlotBackgroundImagein interfaceChartsApi- Parameters:
plotBackgroundImage- the URL for an image to use as the plot background- See Also:
Chart.setPlotBackgroundImage(String)
-
getPlotBackgroundImage
public String getPlotBackgroundImage()
Description copied from interface:ChartsApiReturns the URL for an image to use as the plot background.Default: null.
- Specified by:
getPlotBackgroundImagein interfaceChartsApi- See Also:
Chart.getPlotBackgroundImage()
-
setPlotBorderColor
public void setPlotBorderColor(String plotBorderColor)
Description copied from interface:ChartsApiSets the color of the inner chart or plot area border.- Specified by:
setPlotBorderColorin interfaceChartsApi
-
setPlotBorderColor
public void setPlotBorderColor(LinearGradient plotBorderColor)
Description copied from interface:ChartsApiSets the color of the inner chart or plot area border.- Specified by:
setPlotBorderColorin interfaceChartsApi
-
setPlotBorderColor
public void setPlotBorderColor(RadialGradient plotBorderColor)
Description copied from interface:ChartsApiSets the color of the inner chart or plot area border.- Specified by:
setPlotBorderColorin interfaceChartsApi
-
setPlotBorderColor
public void setPlotBorderColor(Color plotBorderColor)
Description copied from interface:ChartsApiSets the color of the inner chart or plot area border.- Specified by:
setPlotBorderColorin interfaceChartsApi
-
getPlotBorderColor
public Color getPlotBorderColor()
Description copied from interface:ChartsApiReturns the color of the inner chart or plot area border.Default: "#C0C0C0".
- Specified by:
getPlotBorderColorin interfaceChartsApi- See Also:
Chart.getPlotBorderColor()
-
setPlotBorderWidth
public void setPlotBorderWidth(Number plotBorderWidth)
Description copied from interface:ChartsApiSets the pixel width of the plot area border.- Specified by:
setPlotBorderWidthin interfaceChartsApi- Parameters:
plotBorderWidth- the pixel width of the plot area border- See Also:
Chart.setPlotBorderWidth(Number)
-
getPlotBorderWidth
public Number getPlotBorderWidth()
Description copied from interface:ChartsApiReturns the pixel width of the plot area border.Default: 0.
- Specified by:
getPlotBorderWidthin interfaceChartsApi- See Also:
Chart.getPlotBorderWidth()
-
setPlotShadow
public void setPlotShadow(boolean plotShadow)
Description copied from interface:ChartsApiSets whether to apply a drop shadow to the plot area. Requires thatChartsApi.setPlotBackgroundColor(String)be set.- Specified by:
setPlotShadowin interfaceChartsApi- Parameters:
plotShadow- whether to apply a drop shadow to the plot area- See Also:
Chart.setPlotShadow(boolean)
-
isPlotShadow
public boolean isPlotShadow()
Description copied from interface:ChartsApiReturns whether to apply a drop shadow to the plot area. Requires thatChartsApi.setPlotBackgroundColor(String)be set.Default: false.
- Specified by:
isPlotShadowin interfaceChartsApi- See Also:
Chart.isPlotShadow()
-
setPolar
public void setPolar(boolean polar)
Description copied from interface:ChartsApiSets to true to enable the cartesian charts like line, spline, area and column are transformed into the polar coordinate system.- Specified by:
setPolarin 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()
Description copied from interface:ChartsApiReturns whether transforms into the polar coordinate systemDefault: false.
- Specified by:
isPolarin interfaceChartsApi- See Also:
Chart.isPolar()
-
isParallelCoordinates
public boolean isParallelCoordinates()
Description copied from interface:ChartsApiReturns 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:
isParallelCoordinatesin interfaceChartsApi
-
setParallelCoordinates
public void setParallelCoordinates(boolean parallelCoordinates)
Description copied from interface:ChartsApiSets 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.- Specified by:
setParallelCoordinatesin interfaceChartsApi
-
getPanKey
public String getPanKey()
Description copied from interface:ChartsApiReturns 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
-
setPanKey
public void setPanKey(String panKey)
Description copied from interface:ChartsApiSets 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).
-
isPanning
public boolean isPanning()
Description copied from interface:ChartsApiReturns 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
-
setPanning
public void setPanning(boolean panning)
Description copied from interface:ChartsApiSets 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:
setPanningin interfaceChartsApi
-
getParallelAxes
public ParallelAxes getParallelAxes()
Description copied from interface:ChartsApiReturns common options for all yAxes rendered in a parallel coordinates plot, if any. Otherwise, create a new one.- Specified by:
getParallelAxesin interfaceChartsApi
-
setParallelAxes
public void setParallelAxes(ParallelAxes parallelAxes)
Description copied from interface:ChartsApiSets common options for all yAxes rendered in a parallel coordinates plot.- Specified by:
setParallelAxesin interfaceChartsApi
-
setReflow
public void setReflow(boolean reflow)
Description copied from interface:ChartsApiSets whether to reflow the chart to fit the width of the container div on resizing the window.- Specified by:
setReflowin 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()
Description copied from interface:ChartsApiReturns whether to reflow the chart to fit the width of the container div on resizing the window.Default: true.
- Specified by:
isReflowin interfaceChartsApi- See Also:
Chart.isReflow()
-
getResetZoomButton
public ResetZoomButton getResetZoomButton()
Description copied from interface:ChartsApiReturns the button that appears after a selection zoom, allowing the user to reset zoom.Default: null.
- Specified by:
getResetZoomButtonin interfaceChartsApi
-
setResetZoomButton
public void setResetZoomButton(ResetZoomButton resetZoomButton)
Description copied from interface:ChartsApiSets the button that appears after a selection zoom, allowing the user to reset zoom.- Specified by:
setResetZoomButtonin 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:ChartsApiReturns the options for a scrollable plot area.- Specified by:
getScrollablePlotAreain interfaceChartsApi
-
setScrollablePlotArea
public void setScrollablePlotArea(ScrollablePlotArea scrollablePlotArea)
Description copied from interface:ChartsApiSets the options for a scrollable plot area.- Specified by:
setScrollablePlotAreain interfaceChartsApi
-
setSelectionMarkerFill
public void setSelectionMarkerFill(String selectionMarkerFill)
Description copied from interface:ChartsApiSets the background color of the marker square when selecting (zooming in on) an area of the chart.- Specified by:
setSelectionMarkerFillin interfaceChartsApi
-
setSelectionMarkerFill
public void setSelectionMarkerFill(LinearGradient selectionMarkerFill)
Description copied from interface:ChartsApiSets the background color of the marker square when selecting (zooming in on) an area of the chart.- Specified by:
setSelectionMarkerFillin interfaceChartsApi
-
setSelectionMarkerFill
public void setSelectionMarkerFill(RadialGradient selectionMarkerFill)
Description copied from interface:ChartsApiSets the background color of the marker square when selecting (zooming in on) an area of the chart.- Specified by:
setSelectionMarkerFillin interfaceChartsApi
-
setSelectionMarkerFill
public void setSelectionMarkerFill(Color selectionMarkerFill)
Description copied from interface:ChartsApiSets the background color of the marker square when selecting (zooming in on) an area of the chart.- Specified by:
setSelectionMarkerFillin interfaceChartsApi
-
getSelectionMarkerFill
public Color getSelectionMarkerFill()
Description copied from interface:ChartsApiReturns 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:
getSelectionMarkerFillin interfaceChartsApi- See Also:
Chart.getSelectionMarkerFill()
-
setShadow
public void setShadow(boolean shadow)
Description copied from interface:ChartsApiSets whether to apply a drop shadow to the outer chart area. Requires that backgroundColor be set.- Specified by:
setShadowin interfaceChartsApi- Parameters:
shadow- whether to apply a drop shadow to the outer chart area- See Also:
Chart.setShadow(boolean)
-
isShadow
public boolean isShadow()
Description copied from interface:ChartsApiReturns whether to apply a drop shadow to the outer chart area. Requires that backgroundColor be set.Default: false.
- Specified by:
isShadowin interfaceChartsApi- See Also:
Chart.isShadow()
-
setShowAxes
public void setShowAxes(boolean showAxes)
Description copied from interface:ChartsApiSets 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:
setShowAxesin interfaceChartsApi- Parameters:
showAxes- whether to show the axes initially- See Also:
Chart.setShowAxes(boolean)
-
isShowAxes
public boolean isShowAxes()
Description copied from interface:ChartsApiReturns 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:
isShowAxesin interfaceChartsApi- See Also:
Chart.isShowAxes()
-
getSonification
public Sonification getSonification()
Description copied from interface:ChartsApiReturns the sonification options, if any. Otherwise, create a new one.- Specified by:
getSonificationin interfaceChartsApi
-
setSonification
public void setSonification(Sonification sonification)
Description copied from interface:ChartsApiSets the sonification options- Specified by:
setSonificationin interfaceChartsApi
-
setSpacing
public void setSpacing(String spacings)
Description copied from interface:ChartsApiSets 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 ofChartsApi.setSpacingTop(Number),ChartsApi.setSpacingRight(Number),ChartsApi.setSpacingBottom(Number)andChartsApi.setSpacingLeft(Number)for shorthand setting of one option.- Specified by:
setSpacingin interfaceChartsApi- Parameters:
spacings- the distance between the outer edge of the chart and the content, like title, legend, axis title or labels- See Also:
ChartsApi.setSpacing(Number[])
-
setSpacing
public void setSpacing(Number[] spacing)
Description copied from interface:ChartsApiSets 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 ofChartsApi.setSpacingTop(Number),ChartsApi.setSpacingRight(Number),ChartsApi.setSpacingBottom(Number)andChartsApi.setSpacingLeft(Number)for shorthand setting of one option.- Specified by:
setSpacingin 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()
Description copied from interface:ChartsApiReturns 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:
getSpacingin interfaceChartsApi
-
setSpacingBottom
public void setSpacingBottom(Number spacingBottom)
Description copied from interface:ChartsApiSets 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:
setSpacingBottomin 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()
Description copied from interface:ChartsApiReturns 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:
getSpacingBottomin interfaceChartsApi- See Also:
Chart.getSpacingBottom()
-
setSpacingLeft
public void setSpacingLeft(Number spacingLeft)
Description copied from interface:ChartsApiSets 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:
setSpacingLeftin 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()
Description copied from interface:ChartsApiReturns 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:
getSpacingLeftin interfaceChartsApi- See Also:
Chart.getSpacingLeft()
-
setSpacingRight
public void setSpacingRight(Number spacingRight)
Description copied from interface:ChartsApiSets 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:
setSpacingRightin 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()
Description copied from interface:ChartsApiReturns 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:
getSpacingRightin interfaceChartsApi- See Also:
Chart.getSpacingRight()
-
setSpacingTop
public void setSpacingTop(Number spacingTop)
Description copied from interface:ChartsApiSets 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:
setSpacingTopin 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()
Description copied from interface:ChartsApiReturns 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:
getSpacingTopin interfaceChartsApi- See Also:
Chart.getSpacingTop()
-
setStyle
public void setStyle(String style)
Description copied from interface:ChartsApiSets 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
ChartsApi.setStyle(Map)
-
setStyle
public <K,V> void setStyle(Map<K,V> style)
Description copied from interface:ChartsApiSets 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:
which will generate the final results 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" } }
-
getStyle
public <K,V> Map<K,V> getStyle()
Description copied from interface:ChartsApiReturns 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:
getStylein interfaceChartsApi- Type Parameters:
K- type for the keyif style was set using
ChartsApi.setStyle(String), type will be Stringif style was set using
ChartsApi.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
ChartsApi.setStyle(String), type will be Stringif style was set using
ChartsApi.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
-
isStyledMode
public boolean isStyledMode()
Description copied from interface:ChartsApiReturns 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:
isStyledModein interfaceChartsApi
-
setStyledMode
public void setStyledMode(boolean styledMode)
Description copied from interface:ChartsApiSets 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:
setStyledModein interfaceChartsApi
-
setZoomType
public void setZoomType(String zoomType)
Description copied from interface:ChartsApiSets decides in what dimentions the user can zoom by dragging the mouse. Can be one ofx,yorxy.- Specified by:
setZoomTypein interfaceChartsApi- Parameters:
zoomType- decides in what dimentions the user can zoom by dragging the mouse- See Also:
Chart.setZoomType(String)
-
getZoomType
public String getZoomType()
Description copied from interface:ChartsApiReturns decides in what dimentions the user can zoom by dragging the mouse. Can be one ofx,yorxy.Default: null.
- Specified by:
getZoomTypein interfaceChartsApi- See Also:
Chart.getZoomType()
-
getEventsMap
public Map<String,org.zkoss.json.JavaScriptValue> getEventsMap()
Description copied from interface:ChartsApiReturns a map of client side event listeners for the chart.- Specified by:
getEventsMapin interfaceChartsApi
-
setEvents
public void setEvents(Map<String,org.zkoss.json.JavaScriptValue> events)
Description copied from interface:ChartsApiSets 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:ChartsApiSets a client side event for the chart.
-
smartDrawChart
protected void smartDrawChart()
mark a draw flag to inform that this Chart needs update.
-
getTooltip
public Tooltip getTooltip()
Description copied from interface:ChartsApiReturns the Tooltip options, if any. Otherwise, create a new one.- Specified by:
getTooltipin interfaceChartsApi- See Also:
Tooltip
-
setTooltip
public void setTooltip(Tooltip tooltip)
Description copied from interface:ChartsApiSets the Tooltip options- Specified by:
setTooltipin interfaceChartsApi
-
getChart
public Chart getChart()
Description copied from interface:ChartsApiReturns the Chart options, if any. Otherwise, create a new one.
-
setNoData
public void setNoData(NoData noData)
Description copied from interface:ChartsApiSets the no-data options
-
getNoData
public NoData getNoData()
Description copied from interface:ChartsApiReturns the no-data options
-
getExporting
public Exporting getExporting()
Description copied from interface:ChartsApiReturns the Exporting options, if any. Otherwise, create a new one.- Specified by:
getExportingin interfaceChartsApi- See Also:
Exporting
-
setExporting
public void setExporting(Exporting exporting)
Description copied from interface:ChartsApiSets the Exporting options.- Specified by:
setExportingin interfaceChartsApi- See Also:
Exporting
-
setCredits
public void setCredits(Credits credits)
Description copied from interface:ChartsApiSets the Credits options- Specified by:
setCreditsin interfaceChartsApi
-
getCredits
public Credits getCredits()
Description copied from interface:ChartsApiReturns the Credits options, if any. Otherwise, create a new one.- Specified by:
getCreditsin interfaceChartsApi- See Also:
Credits
-
setChart
public void setChart(Chart chart)
Description copied from interface:ChartsApiSets the Chart options
-
getPane
public Pane getPane()
Description copied from interface:ChartsApiReturns the pane at the index 0
-
getPane
public Pane getPane(int index)
Description copied from interface:ChartsApiReturns the pane from the given index
-
getPaneSize
public int getPaneSize()
Description copied from interface:ChartsApiReturns the size of the pane list- Specified by:
getPaneSizein interfaceChartsApi
-
getLegend
public Legend getLegend()
Description copied from interface:ChartsApiReturns the Legend options, if any. Otherwise, create a new one.
-
getLoading
public Loading getLoading()
Description copied from interface:ChartsApiReturns the Loading options, if any. Otherwise, create a new one.- Specified by:
getLoadingin interfaceChartsApi- See Also:
Loading
-
setLegend
public void setLegend(Legend legend)
Description copied from interface:ChartsApiSets the Legend options
-
getLabels
public Labels getLabels()
Description copied from interface:ChartsApiReturns the labels options
-
setLabels
public void setLabels(Labels labels)
Description copied from interface:ChartsApiSets the labels options
-
setLang
public void setLang(Lang lang)
Description copied from interface:ChartsApiSets the lang options
-
setNavigation
public void setNavigation(Navigation navigation)
Description copied from interface:ChartsApiSets the navigation options- Specified by:
setNavigationin interfaceChartsApi
-
getNavigation
public Navigation getNavigation()
Description copied from interface:ChartsApiReturns the navigation options- Specified by:
getNavigationin interfaceChartsApi
-
getPlotOptions
public PlotOptions getPlotOptions()
Description copied from interface:ChartsApiReturns the plotOptions option, if any. Otherwise, create a new one.- Specified by:
getPlotOptionsin interfaceChartsApi- See Also:
PlotOptions
-
setPlotOptions
public void setPlotOptions(PlotOptions plotOptions)
Description copied from interface:ChartsApiSets the plotOptions options- Specified by:
setPlotOptionsin interfaceChartsApi
-
getSeries
public Series getSeries()
Description copied from interface:ChartsApiReturns the Series options, if any. Otherwise, create a new one.Returns the first series (index 0) by default.
- Specified by:
getSeriesin interfaceChartsApi- See Also:
Series,ChartsApi.getSeries(int)
-
addSeries
public void addSeries(Series series)
Description copied from interface:ChartsApiAdd 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)
Description copied from interface:ChartsApiAdd 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()
Description copied from interface:ChartsApiReturns the size of series- Specified by:
getSeriesSizein interfaceChartsApi
-
getSeries
public Series getSeries(int index)
Description copied from interface:ChartsApiReturns the Series options from the given index, if any. Otherwise, create a new one.
-
getXAxis
public XAxis getXAxis()
Description copied from interface:ChartsApiReturns the XAxis options, if any. Otherwise, create a new one.Returns the first xAxis (index 0) by default.
- Specified by:
getXAxisin interfaceChartsApi- See Also:
XAxis,ChartsApi.getXAxis(int)
-
getXAxis
public XAxis getXAxis(int index)
Description copied from interface:ChartsApiReturns the XAxis options from the given index, if any. Otherwise, create a new one.
-
getXAxisSize
public int getXAxisSize()
Description copied from interface:ChartsApiReturns the size of xAxis- Specified by:
getXAxisSizein interfaceChartsApi
-
setXAxis
public void setXAxis(XAxis xaxis)
Description copied from interface:ChartsApiSets the xAxis with out putting it in an Array
-
getYAxis
public YAxis getYAxis()
Description copied from interface:ChartsApiReturns the YAxis options, if any. Otherwise, create a new one.Returns the first yAxis (index 0) by default.
- Specified by:
getYAxisin interfaceChartsApi- See Also:
YAxis,ChartsApi.getYAxis(int)
-
getYAxis
public YAxis getYAxis(int index)
Description copied from interface:ChartsApiReturns the YAxis options from the given index, if any. Otherwise, create a new one.
-
getyAxisSize
public int getyAxisSize()
Description copied from interface:ChartsApiReturns the size of yAxis- Specified by:
getyAxisSizein interfaceChartsApi
-
getYAxisSize
public int getYAxisSize()
Description copied from interface:ChartsApiReturns the size of yAxis- Specified by:
getYAxisSizein interfaceChartsApi
-
setYAxis
public void setYAxis(YAxis yaxis)
Description copied from interface:ChartsApiSets the yAxis with out putting it in an Array
-
getZAxis
public ZAxis getZAxis()
Description copied from interface:ChartsApiReturns the ZAxis options, if any. Otherwise, create a new one.Returns the first zAxis (index 0) by default.
- Specified by:
getZAxisin interfaceChartsApi- See Also:
ZAxis,ChartsApi.getZAxis(int)
-
getZAxis
public ZAxis getZAxis(int index)
Description copied from interface:ChartsApiReturns the ZAxis options from the given index, if any. Otherwise, create a new one.
-
getzAxisSize
public int getzAxisSize()
Description copied from interface:ChartsApiReturns the size of zAxis- Specified by:
getzAxisSizein interfaceChartsApi
-
setZAxis
public void setZAxis(ZAxis zaxis)
Description copied from interface:ChartsApiSets the zAxis with out putting it in an Array
-
getOptions3D
public Options3D getOptions3D()
Description copied from interface:ChartsApiReturns the options to render charts in 3 dimensions.Default: null.
- Specified by:
getOptions3Din interfaceChartsApi
-
setOptions3D
public void setOptions3D(Options3D options3D)
Description copied from interface:ChartsApiSets the options to render charts in 3 dimensions.- Specified by:
setOptions3Din interfaceChartsApi- Parameters:
options3D- the options to render charts in 3 dimensions.
-
getColorAxis
public ColorAxis getColorAxis()
Description copied from interface:ChartsApiReturns the ColorAxis options, if any. Otherwise, create a new one.Returns the first colorAxis (index 0) by default.
- Specified by:
getColorAxisin interfaceChartsApi- See Also:
ColorAxis,ChartsApi.getColorAxis(int)
-
getColorAxis
public ColorAxis getColorAxis(int index)
Description copied from interface:ChartsApiReturns the ColorAxis options from the given index, if any. Otherwise, create a new one.- Specified by:
getColorAxisin interfaceChartsApi- See Also:
ColorAxis,ChartsApi.getColorAxis()
-
setTitle
public void setTitle(String title)
Description copied from interface:ChartsApiSets the chart title.
-
setTitle
public void setTitle(Title title)
Description copied from interface:ChartsApiSets the Title options
-
getTitle
public Title getTitle()
Description copied from interface:ChartsApiReturns the Title options, if any. Otherwise, create a new one.
-
getSubtitle
public Subtitle getSubtitle()
Description copied from interface:ChartsApiReturns the Subtitle options, if any. Otherwise, create a new one.- Specified by:
getSubtitlein interfaceChartsApi- See Also:
Subtitle
-
setSubtitle
public void setSubtitle(String subtitle)
Description copied from interface:ChartsApiSets the chart subtitle- Specified by:
setSubtitlein interfaceChartsApi
-
setSubtitle
public void setSubtitle(Subtitle subtitle)
Description copied from interface:ChartsApiSets the Subtitle options- Specified by:
setSubtitlein interfaceChartsApi
-
setEnableZoomSelection
public void setEnableZoomSelection(boolean enableZoomSelection)
Description copied from interface:ChartsApiSets whether selection event will zoom the chart to the selected area.- Specified by:
setEnableZoomSelectionin interfaceChartsApi- See Also:
Chart.setEnableZoomSelection(boolean)
-
isEnableZoomSelection
public boolean isEnableZoomSelection()
Description copied from interface:ChartsApiReturns whether selection event will zoom the chart to the selected area.Default: true.
- Specified by:
isEnableZoomSelectionin interfaceChartsApi- See Also:
Chart.isEnableZoomSelection()
-
toJSON
public String toJSON()
Gets the JSON result.- Returns:
- JSON string
-
getAnnotation
public Annotation getAnnotation()
Description copied from interface:ChartsApiReturns the Annotation options, if any. Otherwise, create a new one.Returns the first annotation (index 0) by default.
- Specified by:
getAnnotationin interfaceChartsApi- See Also:
Annotation,ChartsApi.getAnnotation(int)
-
getAnnotation
public Annotation getAnnotation(int index)
Description copied from interface:ChartsApiReturns the Annotation options from the given index, if any. Otherwise, create a new one.- Specified by:
getAnnotationin interfaceChartsApi- See Also:
Annotation
-
getAnnotationSize
public int getAnnotationSize()
Description copied from interface:ChartsApiReturns the size of annotations- Specified by:
getAnnotationSizein interfaceChartsApi
-
addAnnotation
public void addAnnotation(Annotation annotation)
Description copied from interface:ChartsApiAdd 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:
addAnnotationin interfaceChartsApi
-
setCaption
public void setCaption(String caption)
Description copied from interface:ChartsApiSets the chart caption.- Specified by:
setCaptionin interfaceChartsApi
-
setCaption
public void setCaption(Caption caption)
Description copied from interface:ChartsApiSets the Caption option.- Specified by:
setCaptionin interfaceChartsApi
-
getCaption
public Caption getCaption()
Description copied from interface:ChartsApiReturns the Caption options, if any. Otherwise, create a new one.- Specified by:
getCaptionin interfaceChartsApi- See Also:
Caption
-
getResponsive
public Responsive getResponsive()
Description copied from interface:ChartsApiReturns a set of rules to apply for different screen or chart sizes. Each rule specifies additional chart options.- Specified by:
getResponsivein interfaceChartsApi
-
setResponsive
public void setResponsive(Responsive responsive)
Description copied from interface:ChartsApiSets a set of rules to apply for different screen or chart sizes. Each rule specifies additional chart options.- Specified by:
setResponsivein interfaceChartsApi
-
-