lt.monarch.chart.chart2D.series
Class SalesMetricBarStrategy<ChartProjector extends Projector>

java.lang.Object
  extended by lt.monarch.chart.chart2D.series.AbstractLineStrategy<ChartProjector>
      extended by lt.monarch.chart.chart2D.series.SalesMetricBarStrategy<ChartProjector>
All Implemented Interfaces:
java.io.Serializable, AbstractStrategy

public class SalesMetricBarStrategy<ChartProjector extends Projector>
extends AbstractLineStrategy<ChartProjector>

Sales metric bar strategy. In addition to actual value, three value zones and a possible target are drawn. Values of separate regions and target are taken from charts data model columns: target is taken from EXTENT, regions are taken from EXTRA, EXTRA2 and EXTRA3. Target value is optional.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  double barSpacing
           
protected  java.awt.Color[] colorPalette
           
protected  Orientation orientation
           
protected  double valueBarScale
           
 
Fields inherited from class lt.monarch.chart.chart2D.series.AbstractLineStrategy
baseValue, cachingEnabled, dirty, isConnected, mapper, metaModel, minMaxValues, model, paintMode, planePoint, projector, showNullValues, style, tempPoint, xMapper, yMapper, zoomMultiplier
 
Constructor Summary
Constructor and Description
SalesMetricBarStrategy()
          Creates SalesMetricBarStrategy with default values
SalesMetricBarStrategy(java.awt.Color[] colors, Orientation orientation)
          Creates SalesMetricBarStrategy
 
Method Summary
Modifier and Type Method and Description
 void dispose()
          Disposes the object
 void draw(AbstractGraphics g, ChartProjector projector, PlaneMapper mapper, HotSpotMap hotMap, boolean showNullValues, Style style, java.lang.Object baseValue, AbstractLineSeries<ChartProjector> series)
          Draws the series in the chart area.
 void setBarSpacing(double barSpacing)
          sets bar spacing
 void setOrientation(Orientation orientation)
          sets bar orientation
 void setPalette(java.awt.Color[] colors)
          sets colors of different bar regions
 void setValueBarScale(double scale)
          sets bar scale
 
Methods inherited from class lt.monarch.chart.chart2D.series.AbstractLineStrategy
calculateSelection, getLinePointByX, getMinMaxValues, getModel, getX, getY, projectPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colorPalette

protected java.awt.Color[] colorPalette

barSpacing

protected double barSpacing

valueBarScale

protected double valueBarScale

orientation

protected Orientation orientation
Constructor Detail

SalesMetricBarStrategy

public SalesMetricBarStrategy()
Creates SalesMetricBarStrategy with default values


SalesMetricBarStrategy

public SalesMetricBarStrategy(java.awt.Color[] colors,
                              Orientation orientation)
Creates SalesMetricBarStrategy

Parameters:
colors - array of 4 colors for different regions of the bars. First there colors represent there value regions and the forth one represents color of actual and target values.
orientation - are bars vertical or horizontal
Method Detail

setPalette

public void setPalette(java.awt.Color[] colors)
sets colors of different bar regions

Parameters:
colors - array of 4 colors for different regions of the bars. First there colors represent there value regions and the forth one represents color of actual and target values.

setOrientation

public void setOrientation(Orientation orientation)
sets bar orientation

Parameters:
orientation - whether bars are vertical or horizontal

setBarSpacing

public void setBarSpacing(double barSpacing)
sets bar spacing

Parameters:
barSpacing - proportional space between separate bars

setValueBarScale

public void setValueBarScale(double scale)
sets bar scale

Parameters:
scale - proportional width of real value indicator compared to value region indicators

dispose

public void dispose()
Description copied from class: AbstractLineStrategy
Disposes the object

Specified by:
dispose in class AbstractLineStrategy<ChartProjector extends Projector>

draw

public void draw(AbstractGraphics g,
                 ChartProjector projector,
                 PlaneMapper mapper,
                 HotSpotMap hotMap,
                 boolean showNullValues,
                 Style style,
                 java.lang.Object baseValue,
                 AbstractLineSeries<ChartProjector> series)
Description copied from class: AbstractLineStrategy
Draws the series in the chart area.

Overrides:
draw in class AbstractLineStrategy<ChartProjector extends Projector>
Parameters:
g - graphics context
projector - projector instance
mapper - plane mapper
hotMap - hot spot map
showNullValues - boolean value indicating whether to show the null values
style - style object
baseValue - base value
series - scatter series instance