com.sencha.gxt.chart.client.chart.series
Class PieSeries<M>

java.lang.Object
  extended by com.sencha.gxt.chart.client.chart.series.Series<M>
      extended by com.sencha.gxt.chart.client.chart.series.MultipleColorSeries<M>
          extended by com.sencha.gxt.chart.client.chart.series.AbstractPieSeries<M>
              extended by com.sencha.gxt.chart.client.chart.series.PieSeries<M>
Type Parameters:
M - data type used by this series
All Implemented Interfaces:
SeriesHandler.HasSeriesHandlers, SeriesItemOutEvent.HasSeriesItemOutHandlers, SeriesItemOverEvent.HasSeriesItemOverHandlers, SeriesSelectionEvent.HasSeriesSelectionHandlers

public class PieSeries<M>
extends AbstractPieSeries<M>

Creates a Pie Chart. A Pie Chart is a useful visualization technique to display quantitative information for different categories that also have a meaning as a whole.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sencha.gxt.chart.client.chart.series.Series
Series.LabelPosition
 
Constructor Summary
PieSeries()
          Creates a pie series.
 
Method Summary
 void addLengthField(ValueProvider<M,? extends Number> lengthField)
          Adds a ValueProvider that represents the radius of a pie slice.
 void delete()
          Removes all the sprites of the series from the surface.
 void drawSeries()
          Draws the series for the current chart.
 ArrayList<ValueProvider<M,? extends Number>> getLengthFields()
          Returns the list of value providers that represent the radius of pie slices.
 double getPopOutMargin()
          Returns the margin that the slices pop out.
 void hide(int yFieldIndex)
          Hides the given y field index from the series.
 void highlight(int yFieldIndex)
          Highlights the series at the given index.
 void highlightAll(int index)
          Highlights all of the items in the series.
 int onMouseMove(PrecisePoint point)
          Method used when the series is moused over.
 void setPopOutMargin(double popOutMargin)
          Sets the margin that the slices pop out.
 void show(int yFieldIndex)
          Shows the given y field index from the series.
 void unHighlight(int yFieldIndex)
          Removes highlighting from the given index.
 void unHighlightAll(int index)
          UnHighlights all items in the series.
 boolean visibleInLegend(int index)
          Returns whether or not the given index is visible in legend.
 
Methods inherited from class com.sencha.gxt.chart.client.chart.series.AbstractPieSeries
getAngleField, getDonut, getLegendLabelProvider, getLegendTitles, setAngleField, setDonut, setLegendLabelProvider, setLegendValueProvider
 
Methods inherited from class com.sencha.gxt.chart.client.chart.series.MultipleColorSeries
addColor, addColor, getColor, getColors, removeColor, removeColor, setColor
 
Methods inherited from class com.sencha.gxt.chart.client.chart.series.Series
addSeriesHandler, addSeriesItemOutHandler, addSeriesItemOverHandler, addSeriesSelectionHandler, calculateBBox, getBBox, getChart, getGutters, getHighlighter, getLabelConfig, getLegendNames, getRenderer, getStroke, getStrokeWidth, getToolTip, getToolTipConfig, getXField, getYAxisPosition, highlightedState, isHighlighting, isShownInLegend, onMouseDown, onMouseOut, removeToolTip, setChart, setHighlighter, setHighlighting, setLabelConfig, setRenderer, setShownInLegend, setStroke, setStrokeWidth, setToolTipConfig, setXField, setYAxisPosition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PieSeries

public PieSeries()
Creates a pie series.

Method Detail

addLengthField

public void addLengthField(ValueProvider<M,? extends Number> lengthField)
Adds a ValueProvider that represents the radius of a pie slice.

Parameters:
lengthField - the value provider

delete

public void delete()
Description copied from class: Series
Removes all the sprites of the series from the surface.

Overrides:
delete in class Series<M>

drawSeries

public void drawSeries()
Description copied from class: Series
Draws the series for the current chart.

Specified by:
drawSeries in class Series<M>

getLengthFields

public ArrayList<ValueProvider<M,? extends Number>> getLengthFields()
Returns the list of value providers that represent the radius of pie slices.

Returns:
the list

getPopOutMargin

public double getPopOutMargin()
Returns the margin that the slices pop out.

Returns:
the margin that the slices pop out

hide

public void hide(int yFieldIndex)
Description copied from class: Series
Hides the given y field index from the series.

Specified by:
hide in class Series<M>
Parameters:
yFieldIndex - the index of the y field

highlight

public void highlight(int yFieldIndex)
Description copied from class: Series
Highlights the series at the given index.

Specified by:
highlight in class Series<M>
Parameters:
yFieldIndex - the index to be highlighted

highlightAll

public void highlightAll(int index)
Description copied from class: Series
Highlights all of the items in the series.

Specified by:
highlightAll in class Series<M>
Parameters:
index - the index of the series

onMouseMove

public int onMouseMove(PrecisePoint point)
Description copied from class: Series
Method used when the series is moused over.

Overrides:
onMouseMove in class Series<M>
Parameters:
point - the point moused over
Returns:
the index of the moused over item

setPopOutMargin

public void setPopOutMargin(double popOutMargin)
Sets the margin that the slices pop out.

Parameters:
popOutMargin - the margin that the slices pop out

show

public void show(int yFieldIndex)
Description copied from class: Series
Shows the given y field index from the series.

Specified by:
show in class Series<M>
Parameters:
yFieldIndex - the index of the y field

unHighlight

public void unHighlight(int yFieldIndex)
Description copied from class: Series
Removes highlighting from the given index.

Specified by:
unHighlight in class Series<M>
Parameters:
yFieldIndex - the index to have its highlighting removed

unHighlightAll

public void unHighlightAll(int index)
Description copied from class: Series
UnHighlights all items in the series.

Specified by:
unHighlightAll in class Series<M>
Parameters:
index - the index of the series

visibleInLegend

public boolean visibleInLegend(int index)
Description copied from class: Series
Returns whether or not the given index is visible in legend.

Specified by:
visibleInLegend in class Series<M>
Parameters:
index - the index to determine visible
Returns:
whether or not it is visible


Copyright © 2011. All Rights Reserved.