|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.charts4j.MapChart
public class MapChart
Map chart constructed with the GCharts
static factory class.
Build a map and paramaterize it with countries and US states that you want to
color along a color gradient. You can also select and zoom in on a
GeographicalArea
.
PoliticalBoundary
,
USAState
,
Country
,
GeographicalArea
,
GCharts
Method Summary | |
---|---|
void |
addPoliticalBoundaries(List<? extends PoliticalBoundary> politicalBoundaries)
Add a list of political boundaries (e.g. |
void |
addPoliticalBoundaries(PoliticalBoundary... politicalBoundaries)
Add one or more political boundaries (e.g. |
void |
addPoliticalBoundary(PoliticalBoundary politicalBoundary)
Add a political boundary (e.g. |
void |
setBackgroundFill(Fill fill)
Specify background fill. |
void |
setColorGradient(Color defaultColor,
Color... colorGradient)
Define a default color and color gradient. |
void |
setDataEncoding(DataEncoding dataEncoding)
Set the data encoding scheme. |
void |
setSize(int width,
int height)
The default is 440x220 which is also the maximum size allowable for a MapChart. |
void |
setTransparency(int opacity)
Specify the chart transparency. |
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 java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final void setColorGradient(Color defaultColor, Color... colorGradient)
defaultColor
- Default color for this map.colorGradient
- Colors defined in the PoliticalBoundary
will be
interpolated along this color gradient.PoliticalBoundary
public final void addPoliticalBoundary(PoliticalBoundary politicalBoundary)
Country
or USAState
).
politicalBoundary
- Pass in a political boundary.public final void addPoliticalBoundaries(PoliticalBoundary... politicalBoundaries)
Country
or
USAState
).
politicalBoundaries
- Pass in one or more political boundaries.public final void addPoliticalBoundaries(List<? extends PoliticalBoundary> politicalBoundaries)
Country
or
USAState
).
politicalBoundaries
- Pass in a list of political boundaries.public final void setSize(int width, int height)
setSize
in interface GChart
width
- Map chart widthheight
- Map chart heightpublic 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |