EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.google.chart
Class PieChart<N extends Number>

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by echopoint.internal.AbstractContainer
          extended by echopoint.google.chart.internal.AbstractChart<N>
              extended by echopoint.google.chart.internal.SimpleChart<N>
                  extended by echopoint.google.chart.PieChart<N>
All Implemented Interfaces:
Serializable, RenderIdSupport

public class PieChart<N extends Number>
extends SimpleChart<N>

Component wrapper for a Pie chart provided by Google Chart API.

The following code shows sample use of this component:

   import echopoint.google.chart.PieChart;
   import echopoint.google.chart.model.ChartData;

     ...
     final ChartData<Integer> data = new ChartData<Integer>();
     final Integer[] array = new Integer[]
        { 31, 28, 31, 30, 31, 31, 31, 31, 30, 31, 30, 31 };
     data.setXdata( Arrays.asList( array ) );

     final PieChart<Integer> chart = new PieChart<Integer>();
     chart.setDimensions( PieChart.Dimensions.p3 );
     final ArrayList<ChartData<Integer>> collection = new ArrayList<ChartData<Integer>>();
     collection.add( data );
     chart.setData( collection );
 

Version:
$Id: PieChart.java 83 2008-11-08 19:32:18Z sptrakesh $
Author:
Rakesh Vidyadharan 2008-08-21
See Also:
Serialized Form

Nested Class Summary
static class PieChart.Dimensions
          An enumeration used to represent the pie chart dimensions.
 
Field Summary
static String PROPERTY_DIMENSIONS
          The property used to configure 2 or 3-dimensional charts.
static String PROPERTY_LABELS
          The property that holds the collection of string labels to associate with the segments in the pie chart.
 
Fields inherited from class echopoint.google.chart.internal.SimpleChart
PROPERTY_LEGEND_POSITION
 
Fields inherited from class echopoint.google.chart.internal.AbstractChart
PROPERTY_ALT, PROPERTY_DATA, PROPERTY_FILL, PROPERTY_TITLE
 
Fields inherited from class echopoint.internal.AbstractContainer
ACTION_COMMAND_PROPERTY, ACTION_LISTENERS_CHANGED_PROPERTY, INPUT_ACTION, PROPERTY_ALIGNMENT, PROPERTY_BACKGROUND_IMAGE, PROPERTY_BORDER, PROPERTY_HEIGHT, PROPERTY_INSETS, PROPERTY_WIDTH
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_NEXT_ID_CHANGED_PROPERTY, FOCUS_PREVIOUS_ID_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
PieChart()
           
 
Method Summary
 PieChart.Dimensions getDimensions()
          Return the PROPERTY_DIMENSIONS property value.
 Collection<String> getLabels()
          Return the PROPERTY_LABELS property value.
 void setDimensions(PieChart.Dimensions dimension)
          Set the value of the PROPERTY_DIMENSIONS property.
 void setLabels(Collection<String> labels)
          Set the value of the PROPERTY_LABELS property.
 
Methods inherited from class echopoint.google.chart.internal.SimpleChart
getLegendPosition, setLegendPosition
 
Methods inherited from class echopoint.google.chart.internal.AbstractChart
getAlt, getData, getFill, getTitle, isValidChild, setAlt, setData, setData, setFill, setTitle
 
Methods inherited from class echopoint.internal.AbstractContainer
addActionListener, fireActionPerformed, getAlignment, getBackgroundImage, getBorder, getHeight, getInsets, getWidth, hasActionListeners, removeActionListener, setAlignment, setBackgroundImage, setBorder, setHeight, setInsets, setWidth
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusNextId, getFocusPreviousId, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidParent, isVisible, processInput, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_DIMENSIONS

public static final String PROPERTY_DIMENSIONS
The property used to configure 2 or 3-dimensional charts. This property is best styled. Defaults to 2-d.

See Also:
Constant Field Values

PROPERTY_LABELS

public static final String PROPERTY_LABELS
The property that holds the collection of string labels to associate with the segments in the pie chart. Please see Pie Labels notes regarding size requirements when using labels.

See Also:
Constant Field Values
Constructor Detail

PieChart

public PieChart()
Method Detail

getDimensions

public PieChart.Dimensions getDimensions()
Return the PROPERTY_DIMENSIONS property value.

Returns:
The value that indicates the chart dimensions.

setDimensions

public void setDimensions(PieChart.Dimensions dimension)
Set the value of the PROPERTY_DIMENSIONS property.

Parameters:
dimension - The value to set.

getLabels

public Collection<String> getLabels()
Return the PROPERTY_LABELS property value.

Returns:
The labels value encoded as required by the chart api.

setLabels

public void setLabels(Collection<String> labels)
Set the value of the PROPERTY_LABELS property.

Parameters:
labels - The value to set.

EchoPoint API - 3.0.0b5
App Webcontainer