Package org.zkoss.chart
Class PlotData
- java.lang.Object
-
- org.zkoss.chart.PlotData
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
public class PlotData extends Object implements org.zkoss.json.JSONAware, OptionDataListener
A plot data used for PlotEngine to generate the result as JSON string.- Author:
- jumperchen
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAnnotations(Annotation annotation)Sets the annotation with out putting it in an Array.voidaddSeries(Series series)Adds the series at the end of the series listvoidaddXAxis(XAxis xAxis)Adds the xAxis at the end of the xAxis list.voidaddYAxis(YAxis yAxis)Adds the yAxis at the end of yAxis list.voidaddZAxis(ZAxis zAxis)Adds the yAxis at the end of zAxis list.booleanequals(Object o)AccessibilitygetAccessibility()Returns options for configuring accessibility for the chart, or create a new one.AnnotationgetAnnotations()Returns the annotation at the index 0.AnnotationgetAnnotations(int index)Returns the annotation from the given index.intgetAnnotationsSize()Returns the size of the annotation list.CaptiongetCaption()Returns the caption options.ChartgetChart()Returns the chart optionsColorAxisgetColorAxis()Returns the color axisColorAxisgetColorAxis(int index)Returns the color axis from the given indexList<Color>getColors()Returns the default colors for the chart's series.CreditsgetCredits()Returns the credits optionsDatagetData()Returns the data optionsDrilldowngetDrilldown()Returns the drilldown optionsExportinggetExporting()Returns whether to enable the exporting moduleLabelsgetLabels()Returns the labels optionsLanggetLang()Returns the labels optionsLegendgetLegend()Returns the legend optionsLoadinggetLoading()Returns the loading optionsNavigationgetNavigation()Returns the navigation optionsNoDatagetNoData()Returns the no-data optionsPanegetPane()Returns the pane at the index 0PanegetPane(int index)Returns the pane from the given indexintgetPaneSize()Return the size of the pane listPlotOptionsgetPlotOptions()Returns the plot optionsResponsivegetResponsive()SeriesgetSeries()Returns the series at the index 0SeriesgetSeries(int index)Returns the series from the given index.intgetSeriesSize()Returns the size of the series listSonificationgetSonification()Returns the sonification optionsSubtitlegetSubtitle()Returns the subtitle optionsTitlegetTitle()Returns the title optionsTooltipgetTooltip()Returns the tooltip optionsXAxisgetXAxis()Returns the xAxis at the index 0XAxisgetXAxis(int index)Returns the xAxis from the given index.intgetXAxisSize()Returns the size of the xAxis list.YAxisgetYAxis()Returns the yAxis at the index 0YAxisgetYAxis(int index)intgetYAxisSize()Returns the size of yAxis list.ZAxisgetZAxis()Returns the zAxis at the index 0ZAxisgetZAxis(int index)intgetZAxisSize()Returns the size of zAxis list.inthashCode()protected PlotDatamerge(PlotData other)Merges the current plot data with the given one.voidonChange(OptionDataEvent event)Sent when the contents of the chart option has changed.voidsetAccessibility(Accessibility accessibility)Sets options for configuring accessibility for the chart.voidsetCaption(Caption caption)Sets the caption options.voidsetChart(Chart chart)Sets the chart optionsvoidsetColorAxis(List<ColorAxis> colorAxis)Sets the color axisvoidsetColorAxis(ColorAxis colorAxis)Deprecated.since 7.2.1.0voidsetColorAxis(ColorAxis... colorAxis)Sets the color axisvoidsetColors(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 optionsvoidsetData(Data data)Sets the data optionsvoidsetDrilldown(Drilldown drilldown)Sets the drilldown optionsvoidsetExporting(Exporting exporting)Sets whether to enable the exporting modulevoidsetLabels(Labels labels)Sets the labels optionsvoidsetLang(Lang lang)Sets the lang optionsvoidsetLegend(Legend legend)Sets the legend optionsvoidsetLoading(Loading loading)Sets the loading optionsvoidsetNavigation(Navigation navigation)Sets the navigation optionsvoidsetNoData(NoData noData)Sets the no-data optionsvoidsetPlotOptions(PlotOptions plotOptions)Sets the plot optionsvoidsetResponsive(Responsive responsive)voidsetSonification(Sonification sonification)Sets the sonification optionsvoidsetSubtitle(Subtitle subtitle)Sets the subtitle optionsvoidsetTitle(Title title)Sets the title optionsvoidsetTooltip(Tooltip tooltip)Sets the tooltip optionsvoidsetXAxis(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 ArrayStringtoJSONString()
-
-
-
Constructor Detail
-
PlotData
public PlotData(Charts owner)
-
-
Method Detail
-
getExporting
public Exporting getExporting()
Returns whether to enable the exporting module
-
getAccessibility
public 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
public 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
-
setExporting
public void setExporting(Exporting exporting)
Sets whether to enable the exporting module
-
getColors
public List<Color> getColors()
Returns the default colors for the chart's series. When all colors are used, new colors are pulled from the start again.
-
setColors
public void setColors(List<Color> colors)
Sets the default colors for the chart's series. When all colors are used, new colors are pulled from the start again.
-
setColors
public void setColors(String... source)
Sets the default colors for the chart's series. When all colors are used, new colors are pulled from the start again.
-
onChange
public void onChange(OptionDataEvent event)
Description copied from interface:OptionDataListenerSent when the contents of the chart option has changed.- Specified by:
onChangein interfaceOptionDataListener
-
getSeries
public Series getSeries()
Returns the series at the index 0
-
getSeriesSize
public int getSeriesSize()
Returns the size of the series list
-
getSeries
public Series getSeries(int index)
Returns the series from the given index.
-
addSeries
public void addSeries(Series series)
Adds the series at the end of the series list
-
getXAxis
public XAxis getXAxis()
Returns the xAxis at the index 0
-
getXAxisSize
public int getXAxisSize()
Returns the size of the xAxis list.
-
getXAxis
public XAxis getXAxis(int index)
Returns the xAxis from the given index.
-
addXAxis
public void addXAxis(XAxis xAxis)
Adds the xAxis at the end of the xAxis list.
-
setXAxis
public void setXAxis(XAxis xAxis)
Sets the xAxis with out putting it in an Array
-
getYAxis
public YAxis getYAxis()
Returns the yAxis at the index 0
-
getYAxisSize
public int getYAxisSize()
Returns the size of yAxis list.
-
getYAxis
public YAxis getYAxis(int index)
-
addYAxis
public void addYAxis(YAxis yAxis)
Adds the yAxis at the end of yAxis list.
-
setYAxis
public void setYAxis(YAxis yAxis)
Sets the yAxis with out putting it in an Array
-
getZAxis
public ZAxis getZAxis()
Returns the zAxis at the index 0
-
getZAxisSize
public int getZAxisSize()
Returns the size of zAxis list.
-
getZAxis
public ZAxis getZAxis(int index)
-
addZAxis
public void addZAxis(ZAxis zAxis)
Adds the yAxis at the end of zAxis list.
-
setZAxis
public void setZAxis(ZAxis zAxis)
Sets the zAxis with out putting it in an Array
-
getColorAxis
public ColorAxis getColorAxis()
Returns the color axis
-
getColorAxis
public ColorAxis getColorAxis(int index)
Returns the color axis from the given index
-
setColorAxis
public void setColorAxis(ColorAxis colorAxis)
Deprecated.since 7.2.1.0Sets the color axis
-
setColorAxis
public void setColorAxis(List<ColorAxis> colorAxis)
Sets the color axis- Since:
- 7.2.1.0
-
setColorAxis
public void setColorAxis(ColorAxis... colorAxis)
Sets the color axis- Since:
- 7.2.1.0
-
getNoData
public NoData getNoData()
Returns the no-data options- Since:
- 1.1.0
-
setNoData
public void setNoData(NoData noData)
Sets the no-data options- Since:
- 1.1.0
-
getChart
public Chart getChart()
Returns the chart options
-
setChart
public void setChart(Chart chart)
Sets the chart options
-
getCredits
public Credits getCredits()
Returns the credits options
-
setCredits
public void setCredits(Credits credits)
Sets the credits options
-
getData
public Data getData()
Returns the data options- Since:
- 11.2.0.0
-
setData
public void setData(Data data)
Sets the data options- Since:
- 11.2.0.0
-
getDrilldown
public Drilldown getDrilldown()
Returns the drilldown options
-
setDrilldown
public void setDrilldown(Drilldown drilldown)
Sets the drilldown options
-
getLabels
public Labels getLabels()
Returns the labels options
-
setLabels
public void setLabels(Labels labels)
Sets the labels options
-
getLang
public Lang getLang()
Returns the labels options- Since:
- 11.2.0.0
-
setLang
public void setLang(Lang lang)
Sets the lang options- Since:
- 11.2.0.0
-
getLegend
public Legend getLegend()
Returns the legend options
-
setLegend
public void setLegend(Legend legend)
Sets the legend options
-
getLoading
public Loading getLoading()
Returns the loading options
-
setLoading
public void setLoading(Loading loading)
Sets the loading options
-
getNavigation
public Navigation getNavigation()
Returns the navigation options
-
setNavigation
public void setNavigation(Navigation navigation)
Sets the navigation options
-
getPlotOptions
public PlotOptions getPlotOptions()
Returns the plot options
-
setPlotOptions
public void setPlotOptions(PlotOptions plotOptions)
Sets the plot options
-
getSonification
public Sonification getSonification()
Returns the sonification options- Since:
- 11.2.0.0
-
setSonification
public void setSonification(Sonification sonification)
Sets the sonification options- Since:
- 11.2.0.0
-
getSubtitle
public Subtitle getSubtitle()
Returns the subtitle options
-
setSubtitle
public void setSubtitle(Subtitle subtitle)
Sets the subtitle options
-
getTitle
public Title getTitle()
Returns the title options
-
setTitle
public void setTitle(Title title)
Sets the title options- Parameters:
title-
-
getTooltip
public Tooltip getTooltip()
Returns the tooltip options
-
setTooltip
public void setTooltip(Tooltip tooltip)
Sets the tooltip options
-
getPane
public Pane getPane()
Returns the pane at the index 0
-
getPaneSize
public int getPaneSize()
Return the size of the pane list
-
getPane
public Pane getPane(int index)
Returns the pane from the given index
-
getAnnotations
public Annotation getAnnotations()
Returns the annotation at the index 0.- Since:
- 7.2.1.0
-
getAnnotationsSize
public int getAnnotationsSize()
Returns the size of the annotation list.- Since:
- 7.2.1.0
-
getAnnotations
public Annotation getAnnotations(int index)
Returns the annotation from the given index.- Since:
- 7.2.1.0
-
addAnnotations
public void addAnnotations(Annotation annotation)
Sets the annotation with out putting it in an Array.- Since:
- 7.2.1.0
-
getCaption
public Caption getCaption()
Returns the caption options.- Since:
- 7.2.1.0
-
setCaption
public void setCaption(Caption caption)
Sets the caption options.- Since:
- 7.2.1.0
-
getResponsive
public Responsive getResponsive()
- Since:
- 7.2.1.0
-
setResponsive
public void setResponsive(Responsive responsive)
- Since:
- 7.2.1.0
-
toJSONString
public String toJSONString()
- Specified by:
toJSONStringin interfaceorg.zkoss.json.JSONAware
-
-