public class Area extends PathDataGenerator
| Modifier and Type | Class and Description |
|---|---|
static class |
Area.InterpolationMode |
| Modifier | Constructor and Description |
|---|---|
protected |
Area() |
| Modifier and Type | Method and Description |
|---|---|
<T> String |
apply(T data)
Generate a piecewise linear area, as in an area chart.
|
<T> String |
apply(T data,
int index)
Generate a piecewise linear area, as in an area chart.
|
Line |
defined(DatumFunction<Boolean> callback)
FIXME: D3 bug ??? Does not seem to work...
|
Area.InterpolationMode |
interpolate()
Returns the current interpolation mode.
|
Area |
interpolate(Area.InterpolationMode i)
Set the current interpolation mode.
|
Area |
x(DatumFunction<Double> callback)
Set the function used to compute x coordinates of points generated
by this area generator.
|
Area |
x(double d)
Set the x coordinates of points generated by this generator.
|
Area |
x0(DatumFunction<Double> callback) |
Area |
x0(double d)
Set the x0 coordinates of points generated by this generator.
|
Area |
x1(DatumFunction<Double> callback) |
Area |
x1(double d)
Set the x1 coordinates of points generated by this generator.
|
Area |
y(DatumFunction<Double> callback)
See
x(DatumFunction). |
Area |
y(double d)
Set the y coordinates of points generated by this generator.
|
Area |
y0(DatumFunction<Double> callback)
See
y(DatumFunction). |
Area |
y0(double d)
Set the y0 coordinates of points generated by this generator.
|
Area |
y1(DatumFunction<Double> callback)
See
y(DatumFunction). |
Area |
y1(double d)
Set the y1 coordinates of points generated by this generator.
|
generate, generate, generate, generatepublic final Area.InterpolationMode interpolate()
public final Area interpolate(Area.InterpolationMode i)
i - the interpolation modepublic final Area x(DatumFunction<Double> callback)
The default accessor assumes that each input element is a two-element array of numbers.
datumFunction - public final Area x(double d)
d - public final Area x0(double d)
d - public final Area x0(DatumFunction<Double> callback)
callback - x(DatumFunction).public final Area x1(double d)
d - public final Area x1(DatumFunction<Double> callback)
callback - x(DatumFunction).public final Area y(double d)
d - public final Area y0(double d)
d - public final Area y1(double d)
d - public final Area y(DatumFunction<Double> callback)
x(DatumFunction).
Note that, like most other graphics libraries, SVG uses the top-left corner as the origin and thus higher values of y are lower on the screen. For visualization we often want the origin in the bottom-left corner instead; one easy way to accomplish this is to invert the range of the y-scale by using range([h, 0]) instead of range([0, h]).
callback - public final Area y0(DatumFunction<Double> callback)
y(DatumFunction).
Note that, like most other graphics libraries, SVG uses the top-left corner as the origin and thus higher values of y are lower on the screen. For visualization we often want the origin in the bottom-left corner instead; one easy way to accomplish this is to invert the range of the y-scale by using range([h, 0]) instead of range([0, h]).
callback - public final Area y1(DatumFunction<Double> callback)
y(DatumFunction).
Note that, like most other graphics libraries, SVG uses the top-left corner as the origin and thus higher values of y are lower on the screen. For visualization we often want the origin in the bottom-left corner instead; one easy way to accomplish this is to invert the range of the y-scale by using range([h, 0]) instead of range([0, h]).
callback - public final Line defined(DatumFunction<Boolean> callback)
The defined accessor can be used to define where the area is defined and undefined, which is typically useful in conjunction with missing data; the generated path data will automatically be broken into multiple distinct subpaths, skipping undefined data.
callback - public final <T> String apply(T data)
Data must be an array-like structure. the type of the array elements depends on the x and y functions. the default x and y functions assumes that each input element is a two-element array of numbers.
public final <T> String apply(T data, int index)
Data must be an array-like structure. the type of the array elements depends on the x and y functions. the default x and y functions assumes that each input element is a two-element array of numbers.
The index will be passed through to the line's accessor functions.
data - index - Copyright © 2013 gwt-d3. All rights reserved.