org.moxieapps.gwt.highcharts.client
Class PaneBackground

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<PaneBackground>
      extended by org.moxieapps.gwt.highcharts.client.PaneBackground

public class PaneBackground
extends Configurable<PaneBackground>

A configurable class that will allow you to control the pane background options of the charts, which applies only to polar charts and angular gauges. This configuration object holds general options for the color, width and border of the pane's background. An instance of this class can be constructed and then set on the pane via the Pane.setBackground(PaneBackground...) method.

Since:
1.6.0
Author:
cskowron@moxiegroup.com (Cory Skowronek)

Nested Class Summary
static class PaneBackground.Shape
          An enumeration of the available shapes for the pane background.
 
Constructor Summary
PaneBackground()
           
 
Method Summary
 PaneBackground setBackgroundColor(Color backgroundColor)
          Convenience method for setting the 'backgroundColor' option of the pane's background, allowing for colors with opacity or gradients.
 PaneBackground setBackgroundColor(String backgroundColor)
          Convenience method for setting the 'backgroundColor' option of the pane's background to an RGB hex value.
 PaneBackground setBorderColor(Color borderColor)
          Convenience method for setting the 'borderColor' option of the pane's border, allowing for colors with opacity or gradients.
 PaneBackground setBorderColor(String borderColor)
          Convenience method for setting the 'borderColor' option of the pane's border to an RGB hex value.
 PaneBackground setBorderWidth(Number borderWidth)
          Convenience method for setting the 'borderWidth' option of the pane's background.
 PaneBackground setBorderWidth(String borderWidth)
          Convenience method for setting the 'borderWidth' option of the pane's background.
 PaneBackground setInnerRadius(Number innerRadius)
          Convenience method for setting the 'innerRadius' option of the pane's background.
 PaneBackground setInnerRadius(String innerRadius)
          Convenience method for setting the 'innerRadius' option of the pane's background.
 PaneBackground setOuterRadius(Number outerRadius)
          Convenience method for setting the 'outerRadius' option of the pane's background.
 PaneBackground setOuterRadius(String outerRadius)
          Convenience method for setting the 'outerRadius' option of the pane's background.
 PaneBackground setShape(PaneBackground.Shape shape)
          Convenience method for setting the 'background' option of the pane.
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.Configurable
getOptions, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaneBackground

public PaneBackground()
Method Detail

setBorderColor

public PaneBackground setBorderColor(String borderColor)
Convenience method for setting the 'borderColor' option of the pane's border to an RGB hex value. Equivalent to:

     chart.setOption("pane/background/borderColor", "#CCCCCC");
 
The RGB background color for the border of the pane. Defaults to "#FFFFFF".

Note that this method is intended for setting the color to a simple RBG hex value. If you instead want to set a color to include an alpha channel or a gradient, use the setBorderColor(Color) version instead

Parameters:
borderColor - The value to set as the 'borderColor' option on the pane.
Returns:
A reference to this PaneBackground instance for convenient method chaining

setBorderColor

public PaneBackground setBorderColor(Color borderColor)
Convenience method for setting the 'borderColor' option of the pane's border, allowing for colors with opacity or gradients. Equivalent to:

     chart.setOption("/pane/borderColor", new Color()
        .setLinearGradient(0.0, 0.0, 1.0, 1.0)
        .addStop(new Color(255, 255, 255))
        .addStop(new Color(200, 200, 255))
     );
 
The background color or gradient for the outer chart area. Defaults to "#FFFFFF".

Note that this method is intended for setting the color to a gradient or color that includes an alpha channel. If you instead just want to set the color to a normal RGB hex value you can use the setBorderColor(String) version instead.

Parameters:
borderColor - The color gradient or color with an alpha channel to set as the 'backgroundBorderColor' option on the pane
Returns:
A reference to this PaneBackground instance for convenient method chaining

setBorderWidth

public PaneBackground setBorderWidth(Number borderWidth)
Convenience method for setting the 'borderWidth' option of the pane's background. Equivalent to:

     pane.setOption("pane/background/borderWidth", 10);
 

Parameters:
borderWidth - Thickness of the background's border in pixels.
Returns:
A reference to this PaneBackground instance for convenient method chaining.

setBorderWidth

public PaneBackground setBorderWidth(String borderWidth)
Convenience method for setting the 'borderWidth' option of the pane's background. Equivalent to:

     pane.setOption("pane/background/borderWidth", '10%');
 

Parameters:
borderWidth - Thickness of the background's border as a percentage of the background.
Returns:
A reference to this PaneBackground instance for convenient method chaining.

setBackgroundColor

public PaneBackground setBackgroundColor(String backgroundColor)
Convenience method for setting the 'backgroundColor' option of the pane's background to an RGB hex value. Equivalent to:

     chart.setOption("pane/background/backgroundColor", "#CCCCCC");
 
The RGB background color for the outer chart area. Defaults to "#FFFFFF".

Note that this method is intended for setting the color to a simple RBG hex value. If you instead want to set a color to include an alpha channel or a gradient, use the setBackgroundColor(Color) version instead

Parameters:
backgroundColor - The value to set as the 'backgroundColor' option on the pane.
Returns:
A reference to this PaneBackground instance for convenient method chaining

setBackgroundColor

public PaneBackground setBackgroundColor(Color backgroundColor)
Convenience method for setting the 'backgroundColor' option of the pane's background, allowing for colors with opacity or gradients. Equivalent to:

     chart.setOption("/pane//backgroundColor", new Color()
        .setLinearGradient(0.0, 0.0, 1.0, 1.0)
        .addStop(new Color(255, 255, 255))
        .addStop(new Color(200, 200, 255))
     );
 
The background color or gradient for the outer chart area. Defaults to "#FFFFFF".

Note that this method is intended for setting the color to a gradient or color that includes an alpha channel. If you instead just want to set the color to a normal RGB hex value you can use the setBackgroundColor(String) version instead.

Parameters:
backgroundColor - The color gradient or color with an alpha channel to set as the 'backgroundColor' option on the pane
Returns:
A reference to this PaneBackground instance for convenient method chaining

setInnerRadius

public PaneBackground setInnerRadius(String innerRadius)
Convenience method for setting the 'innerRadius' option of the pane's background. Equivalent to:

     chart.setOption("pane/background/innerRadius", '100%');
 
Note: The official Highcharts API reference refers to this as "innerRadius," however it is implemented as "innerRadius."

Parameters:
innerRadius - The distance as a percentage of the size of the chart from its center to the inner edge of the background.
Returns:
A reference to this PaneBackground instance for convenient method chaining

setInnerRadius

public PaneBackground setInnerRadius(Number innerRadius)
Convenience method for setting the 'innerRadius' option of the pane's background. Equivalent to:

     chart.setOption("pane/background/innerRadius", 100);
 
Note: The official Highcharts API reference refers to this as "innerRadius," however it is implemented as "innerRadius."

Parameters:
innerRadius - The distance in pixels from the center of the chart to the outer edge of the background.
Returns:
A reference to this PaneBackground instance for convenient method chaining

setOuterRadius

public PaneBackground setOuterRadius(String outerRadius)
Convenience method for setting the 'outerRadius' option of the pane's background. Equivalent to:

     chart.setOption("background/outerRadius", '100%');
 
Note: The official Highcharts API reference refers to this as "outerWidth," however it is implemented as "outerRadius."

Parameters:
outerRadius - The distance as a percentage of the size of the chart from its center to the outer edge of the background.
Returns:
A reference to this PaneBackground instance for convenient method chaining.

setOuterRadius

public PaneBackground setOuterRadius(Number outerRadius)
Convenience method for setting the 'outerRadius' option of the pane's background. Equivalent to:

     chart.setOption("background/outerRadius", 100);
 
Note: The official Highcharts API reference refers to this as "outerWidth," however it is implemented as "outerRadius."

Parameters:
outerRadius - The distance in pixels from the center of the chart to the inner edge of the background.
Returns:
A reference to this PaneBackground instance for convenient method chaining.

setShape

public PaneBackground setShape(PaneBackground.Shape shape)
Convenience method for setting the 'background' option of the pane. Equivalent to:

     chart.setOption("pane/background/shape", "arc");
 
The shape of the pane's background.

Returns:
A reference to this PaneBackground instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.