com.googlecode.wickedcharts.highcharts.options
Class Options

java.lang.Object
  extended by com.googlecode.wickedcharts.highcharts.options.Options
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Theme

public class Options
extends Object
implements Serializable

This is the main class for configuring a chart. The structure of this class is designed to be very close to the Highcharts options object. For explanations of all options, please consult the Highcharts API reference.

The options object will be serialized to a JSON object which is passed into the Highcharts Javascript library. Options that are not set (i.e. that are null), are not serialized into JSON, so that the default values of the Highcharts library will be used.

Author:
Tom Hombergs (tom.hombergs@gmail.com)
See Also:
http://api.highcharts.com/highcharts, Serialized Form

Constructor Summary
Options()
           
Options(Options template)
          Constructs an Options object initialized with the configuration of another Options object.
 
Method Summary
 Options addColor(ColorReference color)
           
 Options addSeries(Series<?> series)
           
 Options addxAxis(Axis xAxis)
          Adds an XAxis to the chart.
 Options addyAxis(Axis yAxis)
          Adds an YAxis to the chart.
 void clearSeries()
           
 void copyFrom(Options template)
           
 ChartOptions getChart()
           
 ChartOptions getChartOptions()
           
 List<? extends ColorReference> getColors()
           
 CreditOptions getCreditOptions()
           
 CreditOptions getCredits()
           
 ExportingOptions getExporting()
           
 Global getGlobal()
           
 Labels getLabels()
           
 Legend getLegend()
           
 Loading getLoading()
           
 List<IProcessableOption> getMarkedForProcessing(String processingKey)
          Returns the IProcessableOptions that were marked by calling markForProcessing(IProcessableOption) with the given key.
 Navigation getNavigation()
           
 Pane getPane()
           
 PlotOptionsChoice getPlotOptions()
           
 List<? extends Series> getSeries()
           
 Axis getSingleXAxis()
          Returns the single xAxis.
 Axis getSingleYAxis()
          Returns the single yAxis.
 Title getSubtitle()
           
 Title getTitle()
           
 Tooltip getTooltip()
           
 List<Axis> getxAxis()
           
 List<Axis> getyAxis()
           
 void markForProcessing(IProcessableOption option)
           
 Options setChart(ChartOptions chart)
           
 Options setChartOptions(ChartOptions chart)
           
 Options setColors(ColorReference... colors)
           
 Options setColors(List<ColorReference> colors)
           
 Options setCreditOptions(CreditOptions credits)
           
 Options setCredits(CreditOptions credits)
           
 Options setExporting(ExportingOptions exporting)
           
 Options setGlobal(Global global)
           
 Options setLabels(Labels labels)
           
 Options setLegend(Legend legend)
           
 Options setLoading(Loading loading)
           
 Options setNavigation(Navigation navigation)
           
 Options setPane(Pane pane)
           
 Options setPlotOptions(PlotOptionsChoice plotOptions)
           
 Options setSeries(List<Series<?>> series)
           
 Options setSubtitle(Title subtitle)
           
 Options setTitle(Title title)
           
 Options setTooltip(Tooltip tooltip)
           
 Options setxAxis(Axis xAxis)
          Sets the single xAxis.
 Options setxAxis(List<Axis> xAxis)
           
 Options setyAxis(Axis yAxis)
          Sets the single yAxis.
 Options setyAxis(List<Axis> yAxis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Options

public Options()

Options

public Options(Options template)
Constructs an Options object initialized with the configuration of another Options object.

Parameters:
template - the Options object to copy the configuration from.
Method Detail

addColor

public Options addColor(ColorReference color)

addSeries

public Options addSeries(Series<?> series)

addxAxis

public Options addxAxis(Axis xAxis)
Adds an XAxis to the chart. You can use setxAxis(Axis) if you want to define a single axis only.

Parameters:
xAxis - the XAxis to add.
Returns:
the Options object for chaining.

addyAxis

public Options addyAxis(Axis yAxis)
Adds an YAxis to the chart. You can use setyAxis(Axis) if you want to define a single axis only.

Parameters:
yAxis - the YAxis to add.
Returns:
the Options object for chaining.

clearSeries

public void clearSeries()

copyFrom

public void copyFrom(Options template)

getChart

public ChartOptions getChart()

getChartOptions

public ChartOptions getChartOptions()

getColors

public List<? extends ColorReference> getColors()

getCreditOptions

public CreditOptions getCreditOptions()

getCredits

public CreditOptions getCredits()

getExporting

public ExportingOptions getExporting()

getGlobal

public Global getGlobal()

getLabels

public Labels getLabels()

getLegend

public Legend getLegend()

getLoading

public Loading getLoading()

getMarkedForProcessing

public List<IProcessableOption> getMarkedForProcessing(String processingKey)
Returns the IProcessableOptions that were marked by calling markForProcessing(IProcessableOption) with the given key.

Parameters:
processingKey - the key with which the options in questions were marked.
Returns:
list of marked IProcessableOptions, or an empty list, if none were marked

getNavigation

public Navigation getNavigation()

getPane

public Pane getPane()

getPlotOptions

public PlotOptionsChoice getPlotOptions()

getSeries

public List<? extends Series> getSeries()

getSingleXAxis

public Axis getSingleXAxis()
Returns the single xAxis. If there is more than one xAxis defined, the first is returned.

Returns:
the single xAxis.

getSingleYAxis

public Axis getSingleYAxis()
Returns the single yAxis. If there is more than one yAxis defined, the first is returned.

Returns:
the single yAxis.

getSubtitle

public Title getSubtitle()

getTitle

public Title getTitle()

getTooltip

public Tooltip getTooltip()

getxAxis

public List<Axis> getxAxis()

getyAxis

public List<Axis> getyAxis()

markForProcessing

public void markForProcessing(IProcessableOption option)

setChart

public Options setChart(ChartOptions chart)

setChartOptions

public Options setChartOptions(ChartOptions chart)

setColors

public Options setColors(ColorReference... colors)

setColors

public Options setColors(List<ColorReference> colors)

setCreditOptions

public Options setCreditOptions(CreditOptions credits)

setCredits

public Options setCredits(CreditOptions credits)

setExporting

public Options setExporting(ExportingOptions exporting)

setGlobal

public Options setGlobal(Global global)

setLabels

public Options setLabels(Labels labels)

setLegend

public Options setLegend(Legend legend)

setLoading

public Options setLoading(Loading loading)

setNavigation

public Options setNavigation(Navigation navigation)

setPane

public Options setPane(Pane pane)

setPlotOptions

public Options setPlotOptions(PlotOptionsChoice plotOptions)

setSeries

public Options setSeries(List<Series<?>> series)

setSubtitle

public Options setSubtitle(Title subtitle)

setTitle

public Options setTitle(Title title)

setTooltip

public Options setTooltip(Tooltip tooltip)

setxAxis

public Options setxAxis(Axis xAxis)
Sets the single xAxis. If you need to define more than one xAxis use addxAxis(Axis). If there are multiple Axes defined when calling this method, only the specified axis will be defined afterwards.

Parameters:
xAxis - the single xAxis of the chart
Returns:
the Options object for chaining

setxAxis

public Options setxAxis(List<Axis> xAxis)

setyAxis

public Options setyAxis(Axis yAxis)
Sets the single yAxis. If you need to define more than one yAxis use addyAxis(Axis). If there are multiple Axes defined when calling this method, only the specified axis will be defined afterwards.

Parameters:
yAxis - the single yAxis of the chart
Returns:
the Options object for chaining

setyAxis

public Options setyAxis(List<Axis> yAxis)


Copyright © 2013. All Rights Reserved.