org.moxieapps.gwt.highcharts.client.labels
Class ProportionalDataLabels<T extends ProportionalDataLabels>

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<T>
      extended by org.moxieapps.gwt.highcharts.client.labels.Labels<T>
          extended by org.moxieapps.gwt.highcharts.client.labels.BaseDataLabels<T>
              extended by org.moxieapps.gwt.highcharts.client.labels.ProportionalDataLabels<T>
Direct Known Subclasses:
FunnelDataLabels, PieDataLabels, PyramidDataLabels

public abstract class ProportionalDataLabels<T extends ProportionalDataLabels>
extends BaseDataLabels<T>

A configurable class that can be used to represent custom data label display options for pie charts and funnel charts, which can then be set as the default data label display approach and applied to the ProportionalPlotOptions (via the FunnelPlotOptions.setFunnelDataLabels(FunnelDataLabels) or PiePlotOptions.setPieDataLabels(PieDataLabels) methods).

Example usage:

   chart.setPiePlotOptions(
     new PiePlotOptions()
       .setPieDataLabels(
           new ProportionalDataLabels()
              .setEnabled(true)
              .setConnectorColor("#FF0000)
              .setConnectorWidth(4.0)
       )
   );
 

Since:
1.0.0
Author:
squinn@moxiegroup.com (Shawn Quinn)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.moxieapps.gwt.highcharts.client.labels.Labels
Labels.Align, Labels.VerticalAlign
 
Constructor Summary
ProportionalDataLabels()
           
 
Method Summary
 T setConnectorColor(String connectorColor)
          Convenience method for setting the 'connectorColor' option for the data labels.
 T setConnectorPadding(Number connectorPadding)
          Convenience method for setting the 'connectorPadding' option for the data labels.
 T setConnectorWidth(Number connectorWidth)
          Convenience method for setting the 'connectorWidth' option for the data labels.
 T setDistance(Number distance)
          Convenience method for setting the 'distance' option for the data labels.
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.labels.BaseDataLabels
getFormatter, setBackgroundColor, setBorderColor, setBorderRadius, setBorderWidth, setFormat, setFormatter, setPadding, setShadow, setUseHTML
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.labels.Labels
setAlign, setColor, setEnabled, setRotation, setStyle, setVerticalAlign, setX, setY
 
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

ProportionalDataLabels

public ProportionalDataLabels()
Method Detail

setConnectorColor

public T setConnectorColor(String connectorColor)
Convenience method for setting the 'connectorColor' option for the data labels. Equivalent to:

     labels.setOption("connectorColor", "#CC0000");
 
The color of the line connecting the data label to the pie slice. Defaults to #606060.

Parameters:
connectorColor - The color of the line connecting the data label to the pie slice.
Returns:
A reference to this ProportionalDataLabels instance for convenient method chaining.

setConnectorPadding

public T setConnectorPadding(Number connectorPadding)
Convenience method for setting the 'connectorPadding' option for the data labels. Equivalent to:

     labels.setOption("connectorPadding", 2.0);
 
The distance from the data label to the connector. Defaults to 5.

Parameters:
connectorPadding - The The distance from the data label to the connector.
Returns:
A reference to this ProportionalDataLabels instance for convenient method chaining.

setConnectorWidth

public T setConnectorWidth(Number connectorWidth)
Convenience method for setting the 'connectorWidth' option for the data labels. Equivalent to:

     labels.setOption("connectorWidth", 2.0);
 
The width of the line connecting the data label to the pie slice. Defaults to 1.

Parameters:
connectorWidth - The width of the line connecting the data label to the pie slice.
Returns:
A reference to this ProportionalDataLabels instance for convenient method chaining.

setDistance

public T setDistance(Number distance)
Convenience method for setting the 'distance' option for the data labels. Equivalent to:

     labels.setOption("distance", 24);
 
The distance of the data label from the pie's edge. Negative numbers put the data label on top of the pie slices. Connectors are only shown for data labels outside the pie. Defaults to 30.

Parameters:
distance - The distance of the data label from the pie's edge.
Returns:
A reference to this ProportionalDataLabels instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.