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

java.lang.Object
  extended by com.sencha.gxt.chart.client.chart.series.SeriesLabelConfig<M>
Type Parameters:
M - the data type used by the config

public class SeriesLabelConfig<M>
extends Object

Configuration for Series labels.


Constructor Summary
SeriesLabelConfig()
           
 
Method Summary
 LabelProvider<M> getCustomLabelProvider()
          Returns the custom label provider.
 Series.LabelPosition getLabelPosition()
          Returns the position of label on the series.
 LabelProvider<Number> getNumericLabelProvider()
          Returns the numeric label provider.
 Sprite getSpriteConfig()
          Returns the label sprite configuration.
 SeriesRenderer<M> getSpriteRenderer()
          Returns the series renderer used on the sprites of the series.
 boolean isLabelContrast()
          Returns whether or not the label automatically contrasts with its background.
 void setCustomLabelProvider(LabelProvider<M> customLabelProvider)
          Returns the custom label provider.
 void setLabelContrast(boolean labelContrast)
          Sets whether or not the label automatically contrasts with its background.
 void setLabelPosition(Series.LabelPosition labelPosition)
          Sets the position of label on the series.
 void setNumberFormatProvider(NumberFormat format)
          Sets a NumberFormat for the numeric label provider.
 void setNumericLabelProvider(LabelProvider<Number> numericLabelProvider)
          Sets the numeric label provider.
 void setSpriteConfig(Sprite spriteConfig)
          Sets the label sprite configuration.
 void setSpriteRenderer(SeriesRenderer<M> spriteRenderer)
          Sets the series renderer used on the sprites of the series.
<V> void
setValueProvider(ValueProvider<M,V> valueProvider, LabelProvider<V> labelProvider)
          Sets a custom ValueProvider for the label.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeriesLabelConfig

public SeriesLabelConfig()
Method Detail

getCustomLabelProvider

public LabelProvider<M> getCustomLabelProvider()
Returns the custom label provider. Overrides numeric label provider.

Returns:
the custom label provider

getLabelPosition

public Series.LabelPosition getLabelPosition()
Returns the position of label on the series.

Returns:
the label position

getNumericLabelProvider

public LabelProvider<Number> getNumericLabelProvider()
Returns the numeric label provider.

Returns:
the numeric label provider

getSpriteConfig

public Sprite getSpriteConfig()
Returns the label sprite configuration.

Returns:
the label sprite configuration

getSpriteRenderer

public SeriesRenderer<M> getSpriteRenderer()
Returns the series renderer used on the sprites of the series.

Returns:
the series renderer used on the sprites of the series

isLabelContrast

public boolean isLabelContrast()
Returns whether or not the label automatically contrasts with its background.

Returns:
true if contrasted

setCustomLabelProvider

public void setCustomLabelProvider(LabelProvider<M> customLabelProvider)
Returns the custom label provider. Overrides numeric label provider.

Parameters:
customLabelProvider - the custom label provider

setLabelContrast

public void setLabelContrast(boolean labelContrast)
Sets whether or not the label automatically contrasts with its background.

Parameters:
labelContrast - true if contrasted

setLabelPosition

public void setLabelPosition(Series.LabelPosition labelPosition)
Sets the position of label on the series.

Parameters:
labelPosition - the label position

setNumberFormatProvider

public void setNumberFormatProvider(NumberFormat format)
Sets a NumberFormat for the numeric label provider.

Parameters:
format - the number formatter

setNumericLabelProvider

public void setNumericLabelProvider(LabelProvider<Number> numericLabelProvider)
Sets the numeric label provider. Uses the appropriate yField on the Series.

Parameters:
numericLabelProvider - the numeric label provider

setSpriteConfig

public void setSpriteConfig(Sprite spriteConfig)
Sets the label sprite configuration.

Parameters:
spriteConfig - sprite configuration

setSpriteRenderer

public void setSpriteRenderer(SeriesRenderer<M> spriteRenderer)
Sets the series renderer used on the sprites of the series.

Parameters:
spriteRenderer - the series renderer used on the sprites of the series

setValueProvider

public <V> void setValueProvider(ValueProvider<M,V> valueProvider,
                                 LabelProvider<V> labelProvider)
Sets a custom ValueProvider for the label.

Parameters:
valueProvider - the custom value provider
labelProvider - the label provider used on the value provider


Copyright © 2011. All Rights Reserved.