com.sencha.gxt.chart.client.chart.series
Class BarSeries<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.BarSeries<M>
Type Parameters:
M - the data type used by this series
All Implemented Interfaces:
SeriesHandler.HasSeriesHandlers, SeriesItemOutEvent.HasSeriesItemOutHandlers, SeriesItemOverEvent.HasSeriesItemOverHandlers, SeriesSelectionEvent.HasSeriesSelectionHandlers

public class BarSeries<M>
extends MultipleColorSeries<M>

Creates a Bar Chart. A Bar Chart is a useful visualization technique to display quantitative information for different categories that can show some progression (or regression) in the data set.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sencha.gxt.chart.client.chart.series.Series
Series.LabelPosition
 
Constructor Summary
BarSeries()
          Creates a bar Series.
 
Method Summary
 void addYField(ValueProvider<M,? extends Number> yField)
          Adds a data field for the y axis of the series.
 void drawSeries()
          Draws the series for the current chart.
 double getBarGirth()
          Calculates the girth of bars in the series.
 double getGroupGutter()
          Returns the gutter between group bars.
 double getGutter()
          Returns the gutter between bars.
 double[] getGutters()
          Returns the axis insets of the series.
 ArrayList<String> getLegendTitles()
          Returns the list of titles used in the legend of the series.
 ValueProvider<M,? extends Number> getyField(int index)
          Returns the value provider for the y-axis of the series at the given index.
 List<ValueProvider<M,? extends Number>> getyFields()
          Returns the list of value providers for the y-axis of the series.
 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.
 boolean isColumn()
          Returns whether or not the series is a column series.
 boolean isStacked()
          Returns whether or not the series is stacked.
 void setColumn(boolean column)
          Sets whether or not the series is a column series.
 void setGroupGutter(double groupGutter)
          Sets the gutter between group bars.
 void setGutter(double gutter)
          Sets the gutter between bars.
 void setLegendTitle(String title)
          Sets the series title used in the legend.
 void setLegendTitles(List<String> legendTitles)
          Sets the list of labels used by the legend.
 void setStacked(boolean stacked)
          Sets whether or not the series is stacked.
 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.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, delete, getBBox, getChart, getHighlighter, getLabelConfig, getLegendNames, getRenderer, getStroke, getStrokeWidth, getToolTip, getToolTipConfig, getXField, getYAxisPosition, highlightedState, isHighlighting, isShownInLegend, onMouseDown, onMouseMove, 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

BarSeries

public BarSeries()
Creates a bar Series.

Method Detail

addYField

public void addYField(ValueProvider<M,? extends Number> yField)
Adds a data field for the y axis of the series.

Parameters:
yField - the value provider for the data on the y axis

drawSeries

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

Specified by:
drawSeries in class Series<M>

getBarGirth

public double getBarGirth()
Calculates the girth of bars in the series.

Returns:
the girth of bars in the series

getGroupGutter

public double getGroupGutter()
Returns the gutter between group bars.

Returns:
the gutter between group bars

getGutter

public double getGutter()
Returns the gutter between bars.

Returns:
the gutter between bars

getGutters

public double[] getGutters()
Description copied from class: Series
Returns the axis insets of the series.

Overrides:
getGutters in class Series<M>
Returns:
the axis insets of the series

getLegendTitles

public ArrayList<String> getLegendTitles()
Description copied from class: Series
Returns the list of titles used in the legend of the series.

Overrides:
getLegendTitles in class Series<M>
Returns:
the list of titles used in the legend of the series

getyField

public ValueProvider<M,? extends Number> getyField(int index)
Returns the value provider for the y-axis of the series at the given index.

Parameters:
index - the index of the value provider
Returns:
the value provider for the y-axis of the series at the given index

getyFields

public List<ValueProvider<M,? extends Number>> getyFields()
Returns the list of value providers for the y-axis of the series.

Returns:
the list of value providers for the y-axis of the series

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

isColumn

public boolean isColumn()
Returns whether or not the series is a column series.

Returns:
true if the series is a column series

isStacked

public boolean isStacked()
Returns whether or not the series is stacked.

Returns:
whether or not the series is stacked

setColumn

public void setColumn(boolean column)
Sets whether or not the series is a column series.

Parameters:
column - true if the series is a column series

setGroupGutter

public void setGroupGutter(double groupGutter)
Sets the gutter between group bars.

Parameters:
groupGutter -

setGutter

public void setGutter(double gutter)
Sets the gutter between bars.

Parameters:
gutter - the gutter between bars

setLegendTitle

public void setLegendTitle(String title)
Sets the series title used in the legend.

Parameters:
title - the series title used in the legend

setLegendTitles

public void setLegendTitles(List<String> legendTitles)
Sets the list of labels used by the legend.

Parameters:
legendTitles - the list of labels

setStacked

public void setStacked(boolean stacked)
Sets whether or not the series is stacked.

Parameters:
stacked - whether or not the series is stacked

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.