public abstract class ChartTag
extends javax.servlet.jsp.tagext.SimpleTagSupport
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HEIGHT
Default height in pixels
|
static int |
DEFAULT_WIDTH
Default width in pixels
|
protected java.lang.String |
dmax
Domain min (default unset = auto)
|
protected java.lang.String |
dmin
Domain min (default unset = auto)
|
protected java.lang.String |
domain
The label of the domain axis, the x-axis on a horizontal chart
|
protected int |
height
The chart height, by default 400 pixels
|
static java.lang.String |
ID
CVS ID
|
protected java.lang.String |
imagemap
the HTML image map name
|
protected org.jfree.chart.ChartRenderingInfo |
info
Used for image-maps, if requested
|
protected boolean |
legend
If true, show the legend (defaults to true)
|
protected java.util.logging.Logger |
logger
Our logger
|
protected java.lang.String |
map
Name for the image-map, if null will not be generated
|
protected org.jfree.chart.plot.PlotOrientation |
orientation
The orientation, by default horizontal
|
protected java.lang.String |
range
The label of the range axis, the y-axis on a horizontal chart
|
protected java.lang.String |
rmax
Range max (default unset = auto)
|
protected java.lang.String |
rmin
Range min (default unset = auto)
|
protected java.lang.String |
title
The title for the chart, by default empty
|
protected java.lang.String |
var
The variable name (id) of the chart, by default 'Chart'.
|
protected int |
width
The chart width, by default 640 pixels
|
Constructor and Description |
---|
ChartTag() |
Modifier and Type | Method and Description |
---|---|
void |
doTag()
Calls the getChart method, saves the chart to the temporary directory
as a PNG with the specified width and height.
|
abstract org.jfree.chart.JFreeChart |
getChart()
Create and return the chart object.
|
int |
getHeight()
Get the heigth of the image
|
int |
getWidth()
Get the width of the image
|
void |
setDomain(java.lang.String label)
Set the domain label, which is along the x axis in a horizontal plot.
|
void |
setDomainMax(java.lang.String dmax)
Set the max value on the domain axis.
|
void |
setDomainMin(java.lang.String dmin)
Set the min value on the domain axis.
|
void |
setHeight(int height)
Set the height to use when creating the image
|
void |
setLegend(boolean legend)
Set whether the legend will be displayed.
|
void |
setMap(java.lang.String map)
Set the variable name for the image map
|
void |
setOrientation(java.lang.String orientation)
Set the orientation, with "horizontal" or "vertical" (case insensitive).
|
void |
setRange(java.lang.String label)
Set the range label, which is along the y axis in a horizontal plot.
|
void |
setRangeMax(java.lang.String rmax)
Set the max value on the range axis.
|
void |
setRangeMin(java.lang.String rmin)
Set the min value on the range axis.
|
void |
setTitle(java.lang.String title)
Set the title of the chart
|
void |
setVar(java.lang.String var)
Set the variable name which will contain the id of the generated
chart image.
|
void |
setWidth(int width)
Set the width to use when creating the image
|
public static final java.lang.String ID
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
protected java.lang.String title
protected java.lang.String domain
protected java.lang.String range
protected java.lang.String var
protected int width
protected int height
protected java.lang.String map
protected boolean legend
protected org.jfree.chart.plot.PlotOrientation orientation
protected java.util.logging.Logger logger
protected java.lang.String rmin
protected java.lang.String rmax
protected java.lang.String dmin
protected java.lang.String dmax
protected java.lang.String imagemap
protected org.jfree.chart.ChartRenderingInfo info
public void setTitle(java.lang.String title)
title
- display titlepublic void setOrientation(java.lang.String orientation)
orientation
- "horizontal" or "vertical"public void setLegend(boolean legend)
legend
- True to display the legend, false to hidepublic abstract org.jfree.chart.JFreeChart getChart()
public void doTag()
doTag
in interface javax.servlet.jsp.tagext.SimpleTag
doTag
in class javax.servlet.jsp.tagext.SimpleTagSupport
public void setVar(java.lang.String var)
var
- namepublic void setMap(java.lang.String map)
map
- namepublic void setWidth(int width)
width
- pixelspublic void setHeight(int height)
height
- pixelspublic void setDomain(java.lang.String label)
label
- textpublic void setRange(java.lang.String label)
label
- textpublic int getWidth()
public int getHeight()
public void setRangeMax(java.lang.String rmax)
rmax
- range maxpublic void setRangeMin(java.lang.String rmin)
rmin
- range minpublic void setDomainMax(java.lang.String dmax)
dmax
- domain maxpublic void setDomainMin(java.lang.String dmin)
dmin
- domain minCopyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona