de.laures.cewolf.cpp
Class ZoomBothAxis

java.lang.Object
  extended by de.laures.cewolf.cpp.ZoomBothAxis
All Implemented Interfaces:
ChartPostProcessor, java.io.Serializable

public class ZoomBothAxis
extends java.lang.Object
implements ChartPostProcessor, java.io.Serializable

A postprocessor for altering the domain and range of a chart, essentially creating a way to "zoom into" a chart. The zooming cabilities for the range (y) axis works for all plots.
The capabilities for the domain (x) axis work only for x/y and timeseries plots (currently only has capabilities to define hours) only, not category plots.
(Note: in order for the set range capabilities to work properly, it is recommended that the "rangeIncludesZero" be set to false using a VisualEnhancer postprocessor.)
The following parameters can be used:
lowerRangeVal optional, default value produced by chart; the lowest value that will be graphed on the range (y) axis
upperRangeVal optional; default value produced by chart; the highest value that will be graphed on the range (y) axis
lowerDomainValN optional; default value produced by chart; the lowest value that will be graphed on the domain (x) axis for a numerical plot (xy plot)
upperDomainValN optional; default value produced by chart; the highest value that will be graphed on the domain (x) axis for a numerical plot (xy plot)
lowerDomainValD optional; default value produced by chart; the minimum time that will be graphed on the domain (x) axis for a time scale graph (timeseries plot)
upperDomainValD optional; default value produced by chart; the maximum time that will be graphed on the domain (x) axis for a time scale graph (timeseries plot)
zoomFactor optional; default 1.0; value to zoom in on the center point
anchorValueD optional; no default value; the domain axis (X axis) of xyplots is centered around this value
anchorValueR optional; no default value; the range axis (Y axis) of xyplots is centered around this value

Example usage:

<chart:chartpostprocessor id="zoom">
  <chart:param name="lowerRangeVal" value="-3.2" />
  <chart:param name="upperRangeVal" value="3.2" />
  <chart:param name="lowerDomainValN" value="-6.0" />
  <chart:param name="upperDomainValN" value="12.5" />
  <chart:param name="lowerDomainValD" value="8:00" />
  <chart:param name="upperDomainValD" value="15:00" />
  <chart:param name="zoomFactor" value="1.5" />
</chart:chartpostprocessor>

Author:
Ann Kapusta
See Also:
Serialized Form

Constructor Summary
ZoomBothAxis()
           
 
Method Summary
 double getAnchorValueD()
           
 double getAnchorValueR()
           
 java.lang.String getLowerDomainValD()
           
 double getLowerDomainValN()
           
 double getLowerRangeVal()
           
 java.lang.String getUpperDomainValD()
           
 double getUpperDomainValN()
           
 double getUpperRangeVal()
           
 double getZoomFactor()
           
 void processChart(org.jfree.chart.JFreeChart chart, java.util.Map<java.lang.String,java.lang.String> params)
          Processes a generated chart.
 void setAnchorValueD(double anchorValueD)
           
 void setAnchorValueR(double anchorValueR)
           
 void setLowerDomainValD(java.lang.String lowerDomainVal)
           
 void setLowerDomainValN(double lowerDomainVal)
           
 void setLowerRangeVal(double lowerRangeVal)
           
 void setUpperDomainValD(java.lang.String upperDomainVal)
           
 void setUpperDomainValN(double upperDomainVal)
           
 void setUpperRangeVal(double upperRangeVal)
           
 void setZoomFactor(double zoomFactor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZoomBothAxis

public ZoomBothAxis()
Method Detail

processChart

public void processChart(org.jfree.chart.JFreeChart chart,
                         java.util.Map<java.lang.String,java.lang.String> params)
Description copied from interface: ChartPostProcessor
Processes a generated chart. This method is called by the ChartProducer after a chart instance is generated and before it is rendered (if so). The ChartProducer is responsible for post processing a chart dependant on and only on the provided parameters. This means that the same parameters should result in the same postprocessings.

Specified by:
processChart in interface ChartPostProcessor
Parameters:
chart - the chart instance
params - parameters passed to the postprocessor. These are defined in the JSP
See Also:
ChartPostProcessorTag

getAnchorValueD

public double getAnchorValueD()

setAnchorValueD

public void setAnchorValueD(double anchorValueD)

getAnchorValueR

public double getAnchorValueR()

setAnchorValueR

public void setAnchorValueR(double anchorValueR)

getZoomFactor

public double getZoomFactor()

setZoomFactor

public void setZoomFactor(double zoomFactor)

getLowerRangeVal

public double getLowerRangeVal()

setLowerRangeVal

public void setLowerRangeVal(double lowerRangeVal)

getUpperRangeVal

public double getUpperRangeVal()

setUpperRangeVal

public void setUpperRangeVal(double upperRangeVal)

getUpperDomainValN

public double getUpperDomainValN()

setUpperDomainValN

public void setUpperDomainValN(double upperDomainVal)

getLowerDomainValN

public double getLowerDomainValN()

setLowerDomainValN

public void setLowerDomainValN(double lowerDomainVal)

getUpperDomainValD

public java.lang.String getUpperDomainValD()

setUpperDomainValD

public void setUpperDomainValD(java.lang.String upperDomainVal)

getLowerDomainValD

public java.lang.String getLowerDomainValD()

setLowerDomainValD

public void setLowerDomainValD(java.lang.String lowerDomainVal)


cewolf tag library - web charts with JFreeChart