|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.gchart.client.GChart.Point
public static class GChart.Point
Represents a single point on one of the chart's curves. This includes the x, y values of the point in "model coordinates" (arbitrary, application-specific, units), as well as an optional annotation (text label) for the point.
To create points, use a curve's addPoint method.
addPoint| Method Summary | |
|---|---|
java.lang.String |
getAnnotationFontColor()
Returns the color of the font used to display the point's annotation text. |
int |
getAnnotationFontSize()
Returns the font size of this point's annotation (text label), in pixels. |
java.lang.String |
getAnnotationFontStyle()
Returns the CSS font-style in which the text of this annotation will be rendered. |
java.lang.String |
getAnnotationFontWeight()
Returns true if annotation will be rendered in a bold, or false if in normal, weight font. |
GChart.AnnotationLocation |
getAnnotationLocation()
Returns the previously specified location, relative to the symbol representing the point, of the annotation (text label) associated with this point. |
java.lang.String |
getAnnotationText()
Returns the text of this point's annotation. |
boolean |
getAnnotationVisible()
Returns true is the point's annotation is visible, false otherwise |
int |
getAnnotationXShift()
Returns the distance, in pixels, that this annotation will be shifted along the x-axis from it's default location. |
int |
getAnnotationYShift()
Returns the distance, in pixels, that this annotation will be shifted along the y-axis from it's default location. |
double |
getX()
Returns the x-coordinate of this point in "model units" (arbitrary, application-specific, units). |
double |
getY()
Returns the y-coordinate of this point in "model units" (arbitrary, application-specific, units). |
void |
setAnnotationFontColor(java.lang.String cssColor)
Specifies the color of the annotation's font. |
void |
setAnnotationFontSize(int fontSize)
Specifies the font size of this point's annotation, in pixels. |
void |
setAnnotationFontStyle(java.lang.String cssStyle)
Specifies the CSS font-style used by this point's annotation message. |
void |
setAnnotationFontWeight(java.lang.String cssWeight)
Specifies the weight of the font that will be used to render the text of this point's annotation. |
void |
setAnnotationLocation(GChart.AnnotationLocation annotationLocation)
Specifies the location, relative to this point's symbol, of this point's annotation (text label). |
void |
setAnnotationText(java.lang.String annotationText)
Specifies the text of this point's annotation (label). |
void |
setAnnotationVisible(boolean isVisible)
Specifies if this point's annotation (label) is visible or not. |
void |
setAnnotationXShift(int xShift)
Specifies the number of pixels (along the x-axis) to move this point's annotation from its default, AnnotationLocation-defined, position. |
void |
setAnnotationYShift(int yShift)
Specifies the number of pixels (along the y-axis) to move this point's annotation from its default, AnnotationLocation-defined, position. |
void |
setX(double x)
Defines the x-coordinate of this point in "model units" (arbitrary, application-specific, units mapped to the horizontal dimension of the plot area). |
void |
setY(double y)
Defines the y-coordinate of this point in "model units" (arbitrary, application-specific, units mapped to the vertical dimension of the plot area). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String getAnnotationFontWeight()
setAnnotationFontWeightpublic java.lang.String getAnnotationFontColor()
setAnnotationFontColorpublic java.lang.String getAnnotationFontStyle()
setAnnotationFontStylepublic int getAnnotationFontSize()
setAnnotationFontSizepublic GChart.AnnotationLocation getAnnotationLocation()
setAnnotationLocationpublic java.lang.String getAnnotationText()
setAnnotationTextpublic boolean getAnnotationVisible()
setAnnotationVisiblepublic int getAnnotationXShift()
setAnnotationXShiftpublic int getAnnotationYShift()
setAnnotationYShiftpublic double getX()
setX,
setY,
getYpublic double getY()
getX,
setX,
setYpublic void setAnnotationFontWeight(java.lang.String cssWeight)
cssWeight - A standard CSS font-weight
specification such as normal, bold, bolder, lighter,
100, 200, ... 900, or inheritgetAnnotationFontWeight,
setAnnotationFontColor,
setAnnotationFontStyle,
setAnnotationFontSize,
setAnnotationXShift,
setAnnotationYShift,
setAnnotationText,
setAnnotationVisiblepublic void setAnnotationFontColor(java.lang.String cssColor)
For more information on standard CSS color
specifications see the discussion in
Symbol.setBackgroundColor.
cssColor - color of the font used to display this
point's annotation message.getAnnotationFontColor,
setAnnotationFontWeight,
setAnnotationFontStyle,
setAnnotationFontSize,
setAnnotationXShift,
setAnnotationYShift,
setAnnotationText,
setAnnotationVisiblepublic void setAnnotationFontStyle(java.lang.String cssStyle)
cssStyle - any valid CSS font-style, namely,
normal, italic, oblique, or inherit.getAnnotationFontStyle,
setAnnotationFontWeight,
setAnnotationFontColor,
setAnnotationFontSize,
setAnnotationXShift,
setAnnotationYShift,
setAnnotationText,
setAnnotationVisiblepublic void setAnnotationFontSize(int fontSize)
fontSize - the font size of this point's annotation, in
pixels.getAnnotationFontSize,
setAnnotationFontWeight,
setAnnotationFontColor,
setAnnotationFontStyle,
setAnnotationXShift,
setAnnotationYShift,
setAnnotationText,
setAnnotationVisiblepublic void setAnnotationLocation(GChart.AnnotationLocation annotationLocation)
You can further adjust the position of a point's annotation by specifying non-zero positional shifts via the setAnnotationXShift and setAnnotationYShift methods.
annotationLocation - the relative location of
the annotationgetAnnotationLocation,
setAnnotationFontWeight,
setAnnotationFontColor,
setAnnotationFontStyle,
setAnnotationFontSize,
setAnnotationText,
setAnnotationXShift,
setAnnotationYShift,
setAnnotationVisiblepublic void setAnnotationText(java.lang.String annotationText)
Though HTML text is not supported, you can change the size, weight, style, and color of tick label text via the setAnnotationFont* family of methods.
annotationText - the text of this point's
annotation, or null to remove all annotation.setAnnotationLocation,
setAnnotationFontWeight,
setAnnotationFontColor,
setAnnotationFontStyle,
setAnnotationFontSize,
setAnnotationXShift,
setAnnotationYShift,
setAnnotationVisiblepublic void setAnnotationVisible(boolean isVisible)
isVisible - use true to make the annotation
visible, or false to hide it.getAnnotationVisible,
setAnnotationLocation,
setAnnotationFontWeight,
setAnnotationFontColor,
setAnnotationFontStyle,
setAnnotationFontSize,
setAnnotationXShift,
setAnnotationYShift,
setAnnotationTextpublic void setAnnotationXShift(int xShift)
For example, with the default xShift of 0, annotations with an AnnotationLocation of EAST will have their left edges flush against the right edge of, say, a box symbol representing the annotated point. You could use an xShift setting of 10 to move the annotation 10 pixels to the right and thus introduce some space between the annotation and the box.
Special convention for pie slices: Points on curves whose symbols represent pie slices always have the positive x-axis associated with the shifts specified by this method aligned with the outward-pointing pie radius that bisects the pie slice. This convention makes it easy to move pie slice annotations radially outward (via xShift > 0) or radially inward (via xShift < 0). For those rare situations where you may need to move a pie annotation perpendicularly to this radius, use setAnnotationYShift.
xShift - number of pixels to move annotation
along the x axis from
it's default, AnnotationLocation-defined,
location.setAnnotationYShift,
setAnnotationLocation,
setAnnotationFontWeight,
setAnnotationFontColor,
setAnnotationFontStyle,
setAnnotationFontSize,
setAnnotationText,
setAnnotationVisible,
getAnnotationXShiftpublic void setAnnotationYShift(int yShift)
For example, with the default yShift of 0, annotations with an AnnotationLocation of SOUTH will have their top edges flush against the bottom edge of, say, a box symbol representing the annotated point. You could use a yShift setting of -10 to move the annotation down 10 pixels and thus introduce some spacing between the annotation and the box.
Special convention for pie slices: Points on curves whose symbols represent pie slices always have the positive x-axis associated with the shifts specified by this method aligned with the outward-pointing pie radius that bisects the pie slice. This convention means that yShift moves pie slice annotations along a line perpendicular to this bisecting pie radius. Use the companion method setAnnotationXShift for the more common operation of moving the annotation towards or away from the pie center.
yShift - number of pixels to move annotation along
the y-axis from it's default,
AnnotationLocation-defined, location.setAnnotationXShift,
setAnnotationLocation,
setAnnotationFontWeight,
setAnnotationFontColor,
setAnnotationFontStyle,
setAnnotationFontSize,
setAnnotationText,
setAnnotationVisible,
getAnnotationXShiftpublic void setX(double x)
x - the x-coordinate of the point in model units.getX,
setY,
getYpublic void setY(double y)
y - the y-coordinate of the point in model units.getX,
setX,
getY
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||