|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.charts4j.AbstractGraphChart
com.googlecode.charts4j.AbstractAxisChart
com.googlecode.charts4j.AbstractMarkableChart
public abstract class AbstractMarkableChart
Abstract type that represents all charts that support range
Marker
s.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.googlecode.charts4j.TitledChart |
---|
TitledChart.ChartTitle |
Field Summary | |
---|---|
protected ParameterManager |
parameterManager
Contains accumulation of all parameters set by client. |
Method Summary | |
---|---|
void |
addHorizontalRangeMarker(double startPoint,
double endPoint,
Color color)
Add a horizontal range marker. |
void |
addVerticalRangeMarker(double startPoint,
double endPoint,
Color color)
Add a vertical range marker. |
Map<String,String> |
getParameters()
Get a map of all the parameters necessary to generate a Google Chart API request. |
protected void |
prepareData()
Prepare data for URL String formation. |
void |
setBackgroundFill(Fill fill)
Specify background fill. |
void |
setDataEncoding(DataEncoding dataEncoding)
Set the data encoding scheme. |
void |
setMargins(int leftMargin,
int rightMargin,
int topMargin,
int bottomMargin)
Specify the chart margins. |
void |
setSize(int width,
int height)
Set the chart size. |
void |
setTransparency(int opacity)
Specify the chart transparency. |
void |
setURLEndpoint(String urlEndpoint)
Sets the chart URL endpoint. |
String |
toURLForHTML()
Create a URL with the ampersand character entity reference (&) in place of an ampersand. |
String |
toURLString()
Create a URL string given the information supplied to this chart. |
Methods inherited from class com.googlecode.charts4j.AbstractAxisChart |
---|
addMarker, addRightAxisLabels, addTopAxisLabels, addXAxisLabels, addYAxisLabels, setGrid |
Methods inherited from class com.googlecode.charts4j.AbstractGraphChart |
---|
setAreaFill, setLegendMargins, setLegendPosition, setTitle, setTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final ParameterManager parameterManager
Method Detail |
---|
public final void addVerticalRangeMarker(double startPoint, double endPoint, Color color)
startPoint
- the position on the x-axis at which the range starts where 0
is leftmost and 100 rightmost.endPoint
- the position on the x-axis at which the range starts where 0
is leftmost and 100 rightmost.color
- color of range marker.public final void addHorizontalRangeMarker(double startPoint, double endPoint, Color color)
startPoint
- the position on the y-axis at which the range starts where 0
is the bottom and 100 is the top.endPoint
- the position on the y-axis at which the range ends where 0 is
the bottom and 100 is the top.color
- color of range marker. Cannot be null.protected void prepareData()
prepareData
in class AbstractAxisChart
public void setSize(int width, int height)
setSize
in interface GChart
width
- chart width. Must be > 0 and <= 1000.height
- chart height. Must be > 0 and <= 1000.public final Map<String,String> getParameters()
getParameters
in interface GChart
public final String toURLString()
GChart.toURLForHTML()
into your Internet application to dynamically
generate charts. URLs beyond 2000 characters are not recommended. You can
sometimes get away with the simple encoding scheme if URL length is a
problem. See GChart.setDataEncoding(DataEncoding dataEncoding)
toURLString
in interface GChart
DataEncoding
,
WWW
FAQs: What is the maximum length of a URL?public final String toURLForHTML()
toURLForHTML
in interface GChart
public void setBackgroundFill(Fill fill)
setBackgroundFill
in interface GChart
fill
- Background fill. Cannot be null.Fill
public void setTransparency(int opacity)
setTransparency
in interface GChart
opacity
- Supply a number between 0 and 100. 0 is completely
transparent, and 100 is completely opaque.public final void setDataEncoding(DataEncoding dataEncoding)
setDataEncoding
in interface GChart
dataEncoding
- Supply the data encoding, either simple or extended. Cannot be
null.public void setMargins(int leftMargin, int rightMargin, int topMargin, int bottomMargin)
GChart.setSize(int, int)
method will not change. The margin moves
inward. It is similar to a CSS padding.
setMargins
in interface GChart
leftMargin
- the left marginrightMargin
- the right margintopMargin
- the top marginbottomMargin
- the bottom marginpublic void setURLEndpoint(String urlEndpoint)
http://chart.apis.google.com/chart
. This method is useful in
situations where other Internet services support the Google Chart API.
For instance, JFreeChart has a Google Chart API emulation called Eastwood. API users can supply
the Eastwood servlet address as the end point URL (e.g.
http://localhost:8080/eastwood-1.1.0/chart
). Note that
Eastwood is not a 100% emulation of the Google Chart API so
"your mileage may vary" in terms of what charts are supported by
Eastwood.
setURLEndpoint
in interface GChart
urlEndpoint
- the new chart url endpoint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |