|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.moxieapps.gwt.highcharts.client.Configurable<Point>
org.moxieapps.gwt.highcharts.client.Point
public class Point
Represents a single data point that can be added to a Series
. As an extension
of Configurable
each point instance can also optionally have configuration options set on it.
Standard example:
chart.addSeries(chart.createSeries()
.setName("Browser share")
.setPoints(new Point[] {
new Point(15, 45.0),
new Point(25, 26.8),
new Point(35, 12.8),
new Point(46, 8.5),
new Point(55, 6.2),
new Point(65, 0.7)
})
);
chart.addSeries(chart.createSeries()
.setName("Browser share")
.setPoints(new Point[]{
new Point("Firefox", 45.0),
new Point("IE", 26.8),
new Point("Chrome", 12.8)
.setSliced(true)
.setSelected(true),
new Point("Safari", 8.5),
new Point("Opera", 6.2),
new Point("Others", 0.7)
})
);
Field Summary | |
---|---|
String |
id
|
Constructor Summary | |
---|---|
Point(com.google.gwt.core.client.JavaScriptObject nativePoint)
This constructor is intended for internal use, and provides the ability to construct a GWT Point instance from the native JS Point instance managed within Highcharts. |
|
Point(Number... values)
Create a new point with an arbitrary number of values. |
|
Point(Number y)
Create a new point, setting only the Y axis value that the point should be rendered at within the series. |
|
Point(Number x,
Number y)
Create a new point, setting both the value that the point should be rendered at on the X and Y axis within the series. |
|
Point(Number x,
Number a,
Number b)
Create a new point for an area range / area range spline chart, setting the x and low / high y values. |
|
Point(Number x,
Number open,
Number high,
Number low,
Number close)
Create a new point for an OHLC chart, setting the x and all four OHLC values. |
|
Point(Number x,
String title,
String text)
Creates a new point of type "flag" at a given value with a title and text. |
|
Point(String name)
Creates a new point with only a 'name' field. |
|
Point(String name,
Number y)
Create a new point, setting the Y axis value that the point should be rendered at within the series as well as the "name" property of the point (which is often the case for pie charts.) |
Method Summary | |
---|---|
Number |
getClose()
For OHLC charts, return the "close" value of the data point |
Number |
getHigh()
For OHLC charts, return the "high" value of the data point |
Number |
getLow()
For OHLC charts, return the "low" value of the data point |
String |
getName()
Return the name property that was set on this point, or null if no name was set. |
com.google.gwt.core.client.JavaScriptObject |
getNativePoint()
Returns a pointer to the native Highchart's JS point instance that this GWT Point instance is associated with. |
Number |
getOpen()
For OHLC charts, return the "open" value of the data point |
String |
getText()
Return the text property that was set on this point, or null if no text was set. |
String |
getTitle()
Return the title property that was set on this point, or null if no name was set. |
com.google.gwt.json.client.JSONObject |
getUserData()
Retrieve any arbitrary data that was stored along with the point (via the setUserData(JSONObject) method) when it was originally added to a series |
Number |
getValue()
Retrieves the intensity 'value' of the point as it pertains to heatmaps. |
Number |
getX()
Retrieve the X value of where point should be rendered at within the series. |
Number |
getY()
Retrieve the Y value of where point should be rendered at within the series. |
Number |
getZ()
Retrieves the Z value of where point should be rendered at within the series for 3D chart types. |
Point |
remove()
Remove the point from the series, automatically redrawing the chart using the default animation options. |
Point |
remove(boolean redraw,
Animation animation)
Remove the point from the series, explicitly controlling whether the chart is redrawn and the details of the animation options. |
Point |
remove(boolean redraw,
boolean animation)
Remove the point from the series, explicitly controlling whether the chart is redrawn and/or animated or not. |
Point |
select(boolean select,
boolean accumulate)
Select or unselect the point. |
Point |
selectToggle(boolean accumulate)
Toggle the selection state of the point. |
Point |
setColor(String color)
Convenience method for setting the 'color' option of the point. |
Point |
setDrilldownSeries(Series drilldownSeries)
Convenience method for setting the 'drilldown' option of the point. |
Point |
setIsIntermediateSum(boolean isIntermediateSum)
Convenience method for setting the 'isIntermediateSum' option for a point. |
Point |
setIsSum(boolean isSum)
Convenience method for setting the 'isSum' option for the point. |
Point |
setMarker(Marker marker)
Override the individual point marker for the point. |
Point |
setName(String name)
Convenience method for setting the 'name' option of the point. |
Point |
setParent(Point parent)
Convenience method for setting the 'parent' option of the point. |
Point |
setParent(String parent)
convenience method for setting the 'parent' option of the point, which is useful for tree map chart types. |
Point |
setSelected(boolean selected)
Convenience method for setting the 'selected' option of the point. |
Point |
setSliced(boolean sliced)
Convenience method for setting the 'sliced' option of the point. |
Point |
setText(String text)
Convenience method for setting the 'text' option of the point. |
Point |
setTitle(String title)
Convenience method for setting the 'title' option of the point. |
Point |
setUserData(com.google.gwt.json.client.JSONObject userData)
Store some arbitrary data on the point. |
Point |
slice(boolean sliced)
Slice out or set back in a pie chart slice, automatically redrawing the chart with the default animation options. |
Point |
slice(boolean sliced,
boolean redraw,
Animation animation)
Slice out or set back in a pie chart slice, controlling whether or not the chart will be automatically redraw or not. |
Point |
slice(boolean sliced,
boolean redraw,
boolean animation)
Slice out or set back in a pie chart slice, controlling whether or not the chart will be automatically redraw or not. |
Point |
sliceToggle()
Toggle slicing out or set back in a pie chart slice, automatically redrawing the chart with the default animation options. |
Point |
sliceToggle(boolean redraw,
Animation animation)
Toggle slicing out or set back in a pie chart slice, controlling whether or not the chart will be automatically redraw or not. |
Point |
sliceToggle(boolean redraw,
boolean animation)
Toggle slicing out or set back in a pie chart slice, controlling whether or not the chart will be automatically redraw or not. |
Point |
update(Number y)
Update the point with the new values, automatically redrawing the chart with the default animation options. |
Point |
update(Number y,
boolean redraw)
Update the point with the new values, specifying whether or not the chart should be automatically redrawn with the new values. |
Point |
update(Number x,
Number y)
Update the point with the new values, automatically redrawing the chart with the default animation options. |
Point |
update(Number x,
Number y,
boolean redraw)
Update the point with the new values, specifying whether or not the chart should be automatically redrawn with the new values. |
Point |
update(Number x,
Number low,
Number high)
Update the point with the new values, automatically redrawing the chart with the default animation options. |
Point |
update(Number x,
Number low,
Number high,
boolean redraw)
Update the point with the new values, specifying whether or not the chart should be automatically redrawn with the new values. |
Point |
update(Point pointOptions)
Update the point with the new values and options from the given point, automatically redrawing the chart with the default animation options. |
Point |
update(Point pointOptions,
boolean redraw,
Animation animation)
Update the point with the new values and options from the given point, specifying if the chart should be automatically redrawn and animated or not. |
Point |
update(Point pointOptions,
boolean redraw,
boolean animation)
Update the point with the new values and options from the given point, specifying if the chart should be automatically redrawn and animated or not. |
Methods inherited from class org.moxieapps.gwt.highcharts.client.Configurable |
---|
getOptions, setOption |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public String id
Constructor Detail |
---|
public Point(Number y)
y
- The Y value that the point should be rendered at within the series.public Point(Number x, Number y)
x
- The X value that the point should be rendered at within the series.y
- The Y value that the point should be rendered at within the series.public Point(Number x, Number a, Number b)
x
- The X value that the point should be rendered at within the series.a
- The "low" value that the point should be rendered at within the series for
a range chart, or the Y value when used in a heatmap.b
- The "high" Y value that the point should be rendered at within the series
for a range chart, or the intensity of the color in a heat map.public Point(Number x, Number open, Number high, Number low, Number close)
x
- The X value that the point should be rendered at within the series.open
- The "open" Y value that the point should be rendered at within the series.high
- The "high" Y value that the point should be rendered at within the series.low
- The "low" Y value that the point should be rendered at within the series.close
- The "close" Y value that the point should be rendered at within the series.public Point(Number... values)
values
- An array of numeric values to initialize the point with.Point(Number)
,
Point(Number, Number)
,
Point(Number, Number, Number)
,
Point(Number, Number, Number, Number, Number)
,
Point(String)
,
Point(String, Number)
,
Point(Number, String, String)
public Point(String name, Number y)
name
- The value to set as the "property" of the point.y
- The Y value that the point should be rendered at within the series.public Point(String name)
setIsIntermediateSum(boolean)
or (@link #setIsSum(boolean)}
name
- The name of the pointpublic Point(Number x, String title, String text)
Series.Type.FLAGS
;
x
- Point where the flag appearstitle
- Title of flag displayed on the charttext
- Text displayed when the flag are highlighted.public Point(com.google.gwt.core.client.JavaScriptObject nativePoint)
nativePoint
- The native javascript object containing the details of the pointMethod Detail |
---|
public Number getValue()
public Number getZ()
public Number getY()
public Number getX()
public Number getOpen()
public Number getHigh()
public Number getLow()
public Number getClose()
public Point setColor(String color)
point.setOption("color", "#CC0000");
Individual color for the point. Defaults to null.
color
- The value to set as the point's color.
Point
instance for convenient method chaining.public Point setDrilldownSeries(Series drilldownSeries)
point.setOption("drilldown", "apples");
This method should be the primary method of adding a drilldown series to a point.
The name of a series in the drilldown.series array to use for a drilldown for this point.
The name option of a point can be set via setName(String)
drilldownSeries
- A series that will be displayed when this point is clicked
Point
instance for convenient method chaining.public Point setIsIntermediateSum(boolean isIntermediateSum)
point.setOption("setIntermediateSum", true)
Used in Waterfall Charts. When this option is set to true, the point will be assigned a value that is calculated
by summing all points since the last 'intermediate sum' Defaults to false.
isIntermediateSum
- Whether the point is an intermediate sum.
Point
instance for convenient method chaining.public Point setIsSum(boolean isSum)
point.setOption("isSum", true);
Used in Waterfall charts. When this option is set to true, the point will ba assigned a value that is
calculated by summing all of the points. Defaults to false.
isSum
- Whether the point is the sum of all points
Point
instance for convenient method chaining.public Point setMarker(Marker marker)
new Point(10, 30)
.setMarker(
new Marker()
.setEnabled(true)
.setFillColor("#CC0000")
.setRadius(4)
);
Note that this method is intended to be used to override the marker options of one
particular point. If you instead want to control the marker options for the entire
series, use the PlotOptions.setMarker(Marker)
method instead.
marker
- The override marker options for this particular point, or null to
simply use the whatever default marker options have been applied to whole series
via PlotOptions.setMarker(Marker)
Point
instance for convenient method chaining.public Point setName(String name)
point.setOption("name", "Green Bears");
The name of the point as shown in the legend, tooltip, dataLabel etc. Defaults to "".
name
- The value to set as the point's name.
Point
instance for convenient method chaining.public String getName()
setName(String)
,
or null if no name was set.public Point setParent(Point parent)
point.setOption("parent", parentPoint.getId());
Sets the parent of the point to the given point.
parent
- The point that will act as this point's 'parent'
Point
instance or convenient method chaining.public Point setParent(String parent)
point.setOption("parent", "categoryXYZ");
parent
- The ID of the point to be used as this point's parent
Point
instance or convenient method chaining.public Point setSelected(boolean selected)
point.setOption("selected", true);
Whether the point is selected or not.
selected
- Whether the point is selected or not.
Point
instance for convenient method chaining.public Point setSliced(boolean sliced)
point.setOption("sliced", false);
Pie series only. Whether to display a slice offset from the center. Defaults to false.
sliced
- The value to set as the point's 'sliced' option.
Point
instance for convenient method chaining.public Point setUserData(com.google.gwt.json.client.JSONObject userData)
PointClickEvent
), which
include a reference to the Point instance that the event was fired on. The Point instances
that are returned from the live rendered chart are actually different instances then the versions
that were originally added to the chart via one of the Series addPoint() or setPoints() methods,
as Highcharts has its own internal representation of all of the point objects. Therefore,
if you need to track some additional information with each point (beyond its axis values)
that you can later access when an event on the point is fired, this method provides a convenient
way for you to store some arbitrary data on the point which will then later be available
via the getUserData()
method.
userData
- Some arbitrary data that to store with the point that will be available
later whenever the point instance is retrieved after the chart is rendered.
Point
instance for convenient method chaining.public com.google.gwt.json.client.JSONObject getUserData()
setUserData(JSONObject)
method) when it was originally added to a series
public Point remove()
Series.removePoint(Point)
method instead of this one.
Point
instance for convenient method chaining.public Point remove(boolean redraw, boolean animation)
Series.removePoint(Point, boolean, boolean)
method instead of this one.
redraw
- Whether to redraw the chart after the point is removed. When removing more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the removing of points is finished.animation
- Defaults to true. When true, the graph will be animated with default animation options.
Note, see the remove(boolean, Animation)
method
for more control over how the animation will run.
Point
instance for convenient method chaining.public Point remove(boolean redraw, Animation animation)
Series.removePoint(Point, boolean, Animation)
method instead of this one.
redraw
- Whether to redraw the chart after the point is removed. When removing more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the removing of points is finished.animation
- The custom animation to use when removing the point from the series.
Point
instance for convenient method chaining.public Point select(boolean select, boolean accumulate)
selectToggle(boolean)
method for other options.
select
- When true, the point is selected. If you'd instead like to simply toggle the selection
state see the selectToggle(boolean)
method instead.accumulate
- When true, the selection is added to other selected points. When false, other
selected points are deselected. Internally in Highcharts, selected points
are accumulated on Control, Shift or Cmd clicking the point.
Point
instance for convenient method chaining.public Point selectToggle(boolean accumulate)
select(boolean, boolean)
method for other options.
accumulate
- When true, the selection is added to other selected points. When false, other
selected points are deselected. Internally in Highcharts, selected points
are accumulated on Control, Shift or Cmd clicking the point.
Point
instance for convenient method chaining.public Point slice(boolean sliced)
sliceToggle()
method as well.
sliced
- When true, the point is sliced out. When false, the point is set in.
Point
instance for convenient method chaining.public Point slice(boolean sliced, boolean redraw, boolean animation)
sliceToggle(boolean, boolean)
method as well.
sliced
- When true, the point is sliced out. When false, the point is set in.redraw
- Whether to redraw the chart after the point is sliced. When slicing more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the slicing of points is finished.animation
- Defaults to true. When true, the graph will be animated with default animation options.
Note, also see the slice(boolean, boolean, Animation)
method
Point
instance for convenient method chaining.public Point slice(boolean sliced, boolean redraw, Animation animation)
sliceToggle(boolean, Animation)
method as well.
sliced
- When true, the point is sliced out. When false, the point is set in.redraw
- Whether to redraw the chart after the point is sliced. When slicing more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the slicing of points is finished.animation
- The custom animation to use when slicing the point ing the series.
Point
instance for convenient method chaining.public Point sliceToggle()
slice(boolean)
method as well.
Point
instance for convenient method chaining.public Point sliceToggle(boolean redraw, boolean animation)
slice(boolean, boolean, boolean)
method as well.
redraw
- Whether to redraw the chart after the point is sliced. When slicing more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the slicing of points is finished.animation
- Defaults to true. When true, the graph will be animated with default animation options.
Note, also see the slice(boolean, boolean, Animation)
method
Point
instance for convenient method chaining.public Point sliceToggle(boolean redraw, Animation animation)
slice(boolean, boolean, Animation)
method as well.
redraw
- Whether to redraw the chart after the point is sliced. When slicing more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the slicing of points is finished.animation
- The custom animation to use when slicing the point ing the series.
Point
instance for convenient method chaining.public Point setText(String text)
point.setOption("text", "Green Bears");
The text of the point as shown in the tooltip, defaults to "".
text
- The value to set as the point's text.
Point
instance for convenient method chaining.public String getText()
setText(String)
,
or null if no text was set.public Point setTitle(String title)
point.setOption("title", "Green Bears");
The title of the point as shown in the tooltip. Defaults to "".
title
- The value to set as the point's title.
Point
instance for convenient method chaining.public String getTitle()
setTitle(String)
,
or null if no title was set.public Point update(Number y)
y
- The new y value for the point.
Point
instance for convenient method chaining.public Point update(Number x, Number y)
x
- The new x value for the point.y
- The new value for the point.
Point
instance for convenient method chaining.public Point update(Number x, Number low, Number high)
x
- The new x value for the point.low
- The new low value for the point.high
- The new high value for the point.
Point
instance for convenient method chaining.public Point update(Number y, boolean redraw)
y
- The new y value for the point.redraw
- Whether to redraw the chart after the point is updated. When updating more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the updating of points is finished.
Point
instance for convenient method chaining.public Point update(Number x, Number y, boolean redraw)
x
- The new x value for the point.y
- The new value for the point.redraw
- Whether to redraw the chart after the point is updated. When updating more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the updating of points is finished.
Point
instance for convenient method chaining.public Point update(Number x, Number low, Number high, boolean redraw)
x
- The new x value for the point.low
- The new low value for the point.high
- The new high value for the point.redraw
- Whether to redraw the chart after the point is updated. When updating more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the updating of points is finished.
Point
instance for convenient method chaining.public Point update(Point pointOptions)
pointOptions
- The point instance from which the new values and options will be retrieved.
Point
instance for convenient method chaining.public Point update(Point pointOptions, boolean redraw, boolean animation)
pointOptions
- The point instance from which the new values and options will be retrieved.redraw
- Whether to redraw the chart after the point is updated. When updating more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the updating of points is finished.animation
- Defaults to true. When true, the graph will be animated with default animation options.
Note, see the update(Point, boolean, Animation)
method
for more control over how the animation will run.
Point
instance for convenient method chaining.public Point update(Point pointOptions, boolean redraw, Animation animation)
pointOptions
- The point instance from which the new values and options will be retrieved.redraw
- Whether to redraw the chart after the point is updating. When updating more than one
point, it is highly recommended that the redraw option be set to false, and instead
BaseChart.redraw()
is explicitly called after the updating of points is finished.animation
- The custom animation to use when updating the point in the series.
Point
instance for convenient method chaining.public com.google.gwt.core.client.JavaScriptObject getNativePoint()
PointEvent
or Series.getPoints()
. For advanced use-cases only.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |