org.moxieapps.gwt.highcharts.client
Class Drilldown

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

public class Drilldown
extends Configurable<Drilldown>

A configurable class that can be used to drill down into a series or point, the concept of inspecting increasingly high resolution data through clicking on chart items like columns or pie slices. Sample Usage:


      Series animalSeries = chart.createSeries()
          .setPoints(new Point[] {
              new Point("Cats", 4),
              new Point("Dogs", 2),
              new Point("Cows", 2),
              new Point("Sheep", 2)
              new Point("Pigs", 1)
          });

      Series fruitSeries = chart.createSeries()
          .setPoints(new Point[] {
              new Point("Apples", 4),
              new Point("Oranges", 2)
          });

      Series carSeries = chart.createSeries()
          .setPoints(new Point[] {
              new Point("Toyota", 4),
              new Point("Opel", 2),
              new Point("Volkswagen", 2)
          });

      chart.setDrilldown(new Drilldown()
          .setSeries(animalSeries, fruitSeries, carSeries)
      );
 
The previously created series can be set to be displayed when a specific point is clicked via the Point.setDrilldownSeries(Series) method as follows:

     chart.addSeries(chart.createSeries()
          .setName("Random Series")
          .setPoints(new Point[]{
              new Point("Animals", 5)
                  .setDrilldown(animalSeries)
          })
     );
 
Note that the drilldown feature requires the drilldown.js file to be loaded, found in the modules directory of the download package, or online at code.highcharts.com/modules/drilldown.js.


Constructor Summary
Drilldown()
           
 
Method Summary
 Drilldown setActiveAxisLabelStyle(Style activeAxisLabelStyle)
          Convenience method for setting the 'activeAxisLabelStyle' option of the drilldown.
 Drilldown setActiveDataLabelStyle(Style activeDataLabelStyle)
          Convenience method for setting the 'activeDataLabelStyle' option of the drilldown.
 Drilldown setAnimation(Animation animation)
          Convenience method for setting the 'animation' option of the drilldown.
 Drilldown setAnimation(Boolean animation)
          Convenience method for setting the 'animation' option of the drilldown.
 Drilldown setDrillUpButtonPosition(Position buttonPosition)
          Convenience method for setting the 'buttonPosition' option of the drillUpButton.
 Drilldown setDrillUpButtonRelativeTo(MapNavigation.AlignTo drillUpButtonRelativeTo)
          Convenience method for setting the 'relativeTo' option of the drillUpButton.
 Drilldown setDrillUpButtonTheme(Theme drillUpButtonTheme)
          Convenience method for setting the 'theme' option of the drillUpButton.
 Drilldown setSeries(Series... series)
          Convenience method for setting the 'series' option of the drilldown.
 
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

Drilldown

public Drilldown()
Method Detail

setActiveAxisLabelStyle

public Drilldown setActiveAxisLabelStyle(Style activeAxisLabelStyle)
Convenience method for setting the 'activeAxisLabelStyle' option of the drilldown. Equivalent to:

     drilldown.setOption("activeAxisLabelStyle", new Style());
 
Additional styles to apply to the X axis label for a point that has drilldown data. By default it is underlined and blue to invite to interaction. Defaults to:

      activeAxisLabelStyle: {
          cursor: 'pointer',
          color: '#0d233a',
          fontWeight: 'bold',
          textDecoration: 'underline'
      }
 

Parameters:
activeAxisLabelStyle - The style to apply to the axis label
Returns:
A reference to this Drilldown instance for convenient method chaining.

setActiveDataLabelStyle

public Drilldown setActiveDataLabelStyle(Style activeDataLabelStyle)
Convenience method for setting the 'activeDataLabelStyle' option of the drilldown. Equivalent to:

     drilldown.setOption("activeDataLabelStyle", new Style());
 
Additional styles to apply to the data label of a point that has drilldown data. By default it is underlined and blue to invite to interaction. Defaults to:

      activeAxisLabelStyle: {
          cursor: 'pointer',
          color: '#0d233a',
          fontWeight: 'bold',
          textDecoration: 'underline'
      }
 

Parameters:
activeDataLabelStyle - the style to apply to the active data label.
Returns:
A reference to this Drilldown instance for convenient method chaining.

setAnimation

public Drilldown setAnimation(Boolean animation)
Convenience method for setting the 'animation' option of the drilldown. Equivalent to:

     drilldown.setOption("animation", false);
 
Set the animation for all drilldown animations. Animation of a drilldown occurs when drilling between a column point and a column series, or a pie slice and a full pie series. Drilldown can still be used between series and points of different types, but animation will not occur.

Note that this method is intended for setting the animation to a boolean value. If true, it will use the 'swing' jQuery easing and a duration of 500 ms. If you want to set the animation to a configuration object, use the setAnimation(Animation) version instead.

Parameters:
animation - 'true' to enable animation for drilldowns
Returns:
A reference to this Drilldown instance for convenient method chaining.

setAnimation

public Drilldown setAnimation(Animation animation)
Convenience method for setting the 'animation' option of the drilldown. Equivalent to:

     drilldown.setOption("animation", false);
 
Set the animation for all drilldown animations. Animation of a drilldown occurs when drilling between a column point and a column series, or a pie slice and a full pie series. Drilldown can still be used between series and points of different types, but animation will not occur.

Note that this method is intended for setting the animation to a configuration object. If used as a configuration object, the following properties are supported:

 duration
      The duration of the animation in milliseconds.
 easing
      When using jQuery as the general framework, the easing can be set to linear or swing. More easing functions
      are available with the use of jQuery plug-ins, most notably the jQuery UI suite. See the jQuery docs. When
      using MooTools as the general framework, use the property name transition instead of easing.
 
If you want to set the animation to a boolean value, use the setAnimation(Boolean) version instead.

Parameters:
animation - The animation options to assign to the drilldown
Returns:
A reference to this Drilldown instance for convenient method chaining.

setDrillUpButtonPosition

public Drilldown setDrillUpButtonPosition(Position buttonPosition)
Convenience method for setting the 'buttonPosition' option of the drillUpButton. Equivalent to:

     drilldown.setOption("/drillUpButton/position", new Position());
 
Positioning options for the button within the relativeTo box. Available properties are x, y, align and verticalAlign.

Parameters:
buttonPosition - A set of options representing the position of the drillUp button
Returns:
A reference to this Drilldown instance for convenient method chaining.

setDrillUpButtonRelativeTo

public Drilldown setDrillUpButtonRelativeTo(MapNavigation.AlignTo drillUpButtonRelativeTo)
Convenience method for setting the 'relativeTo' option of the drillUpButton. Equivalent to:

     drilldown.setOption("/drillUpButton/relativeTo", "plotBox");
 
What box to align the button to. Can be either "plotBox" or "spacingBox". Defaults to plotBox.

Parameters:
drillUpButtonRelativeTo - The box to which the position of the drillUpButton is relative
Returns:
A reference to this Drilldown instance for convenient method chaining.

setDrillUpButtonTheme

public Drilldown setDrillUpButtonTheme(Theme drillUpButtonTheme)
Convenience method for setting the 'theme' option of the drillUpButton. Equivalent to:

     drilldown.setOption("/drillUpButton/theme", new Theme());
 
A collection of attributes for the button. The object takes SVG attributes like fill, stroke, stroke-width or r, the border radius. The theme also supports style, a collection of CSS properties for the text.

Parameters:
drillUpButtonTheme - The theme options for the drillUpButton
Returns:
A reference to this Drilldown instance for convenient method chaining.

setSeries

public Drilldown setSeries(Series... series)
Convenience method for setting the 'series' option of the drilldown. Equivalent to:

     drilldown.setOption("series", new Series());
 
Each series configuration uses the same syntax as the series option set. These drilldown series are hidden by default. The drilldown series is linked to the parent series' point by its id.

Parameters:
series - An array of series objects for the drilldown.
Returns:
A reference to this Drilldown instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.