public class VisualizeImageChartRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.visualizeImageChart(VisualizeImageChartRequest)
.
Scatter plot is the only plot type currently supported. A non-numeric column
can be specified as x or y column and jitters can be added to them to avoid
excessive overlapping. All color values must be in the format RRGGBB or
AARRGGBB (to specify the alpha value).
The image is contained in the imageData
field.
Modifier and Type | Class and Description |
---|---|
static class |
VisualizeImageChartRequest.StyleOptions
Rendering style options for a chart.
|
Constructor and Description |
---|
VisualizeImageChartRequest()
Constructs a VisualizeImageChartRequest object with default parameters.
|
VisualizeImageChartRequest(String tableName,
String xColumnName,
String yColumnName,
double minX,
double maxX,
double minY,
double maxY,
int width,
int height,
String bgColor,
Map<String,List<String>> styleOptions,
Map<String,String> options)
Constructs a VisualizeImageChartRequest object with the specified
parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getBgColor() |
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
int |
getHeight() |
double |
getMaxX() |
double |
getMaxY() |
double |
getMinX() |
double |
getMinY() |
Map<String,String> |
getOptions() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
Map<String,List<String>> |
getStyleOptions() |
String |
getTableName() |
int |
getWidth() |
String |
getXColumnName() |
String |
getYColumnName() |
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
VisualizeImageChartRequest |
setBgColor(String bgColor) |
VisualizeImageChartRequest |
setHeight(int height) |
VisualizeImageChartRequest |
setMaxX(double maxX) |
VisualizeImageChartRequest |
setMaxY(double maxY) |
VisualizeImageChartRequest |
setMinX(double minX) |
VisualizeImageChartRequest |
setMinY(double minY) |
VisualizeImageChartRequest |
setOptions(Map<String,String> options) |
VisualizeImageChartRequest |
setStyleOptions(Map<String,List<String>> styleOptions) |
VisualizeImageChartRequest |
setTableName(String tableName) |
VisualizeImageChartRequest |
setWidth(int width) |
VisualizeImageChartRequest |
setXColumnName(String xColumnName) |
VisualizeImageChartRequest |
setYColumnName(String yColumnName) |
String |
toString() |
public VisualizeImageChartRequest()
public VisualizeImageChartRequest(String tableName, String xColumnName, String yColumnName, double minX, double maxX, double minY, double maxY, int width, int height, String bgColor, Map<String,List<String>> styleOptions, Map<String,String> options)
tableName
- Name of the table containing the data to be drawn as a
chart.xColumnName
- Name of the column containing the data mapped to the
x axis of a chart.yColumnName
- Name of the column containing the data mapped to the
y axis of a chart.minX
- Lower bound for the x column values. For non-numeric x
column, each x column item is mapped to an integral value
starting from 0.maxX
- Upper bound for the x column values. For non-numeric x
column, each x column item is mapped to an integral value
starting from 0.minY
- Lower bound for the y column values. For non-numeric y
column, each y column item is mapped to an integral value
starting from 0.maxY
- Upper bound for the y column values. For non-numeric y
column, each y column item is mapped to an integral value
starting from 0.width
- Width of the generated image in pixels.height
- Height of the generated image in pixels.bgColor
- Background color of the generated image.styleOptions
- Rendering style options for a chart.
POINTCOLOR
: The color of points in the plot
represented as a hexadecimal number.
POINTSIZE
: The size of points in the plot
represented as number of pixels.
POINTSHAPE
: The shape of points in the plot.
Supported values:
The default value is SQUARE
.
CB_POINTCOLORS
: Point color class break
information consisting of three entries:
class-break attribute, class-break values/ranges,
and point color values. This option overrides the
pointcolor option if both are provided. Class-break
ranges are represented in the form of "min:max".
Class-break values/ranges and point color values
are separated by cb_delimiter, e.g. {"price",
"20:30;30:40;40:50", "0xFF0000;0x00FF00;0x0000FF"}.
CB_POINTSIZES
: Point size class break information
consisting of three entries: class-break attribute,
class-break values/ranges, and point size values.
This option overrides the pointsize option if both
are provided. Class-break ranges are represented in
the form of "min:max". Class-break values/ranges
and point size values are separated by
cb_delimiter, e.g. {"states", "NY;TX;CA", "3;5;7"}.
CB_POINTSHAPES
: Point shape class break
information consisting of three entries:
class-break attribute, class-break values/ranges,
and point shape names. This option overrides the
pointshape option if both are provided. Class-break
ranges are represented in the form of "min:max".
Class-break values/ranges and point shape names are
separated by cb_delimiter, e.g. {"states",
"NY;TX;CA", "circle;square;diamond"}.
CB_DELIMITER
: A character or string which
separates per-class values in a class-break style
option string.
X_ORDER_BY
: An expression or aggregate expression
by which non-numeric x column values are sorted,
e.g. "avg(price) descending".
Y_ORDER_BY
: An expression or aggregate expression
by which non-numeric y column values are sorted,
e.g. "avg(price)", which defaults to "avg(price)
ascending".
JITTER_X
: Amplitude of horizontal jitter applied
to non-numaric x column values.
JITTER_Y
: Amplitude of vertical jitter applied to
non-numaric y column values.
PLOT_ALL
: If this options is set to "true", all
non-numeric column values are plotted ignoring
min_x, max_x, min_y and max_y parameters.
options
- Optional parameters.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public VisualizeImageChartRequest setTableName(String tableName)
tableName
- Name of the table containing the data to be drawn as a
chart.this
to mimic the builder pattern.public String getXColumnName()
public VisualizeImageChartRequest setXColumnName(String xColumnName)
xColumnName
- Name of the column containing the data mapped to the
x axis of a chart.this
to mimic the builder pattern.public String getYColumnName()
public VisualizeImageChartRequest setYColumnName(String yColumnName)
yColumnName
- Name of the column containing the data mapped to the
y axis of a chart.this
to mimic the builder pattern.public double getMinX()
public VisualizeImageChartRequest setMinX(double minX)
minX
- Lower bound for the x column values. For non-numeric x
column, each x column item is mapped to an integral value
starting from 0.this
to mimic the builder pattern.public double getMaxX()
public VisualizeImageChartRequest setMaxX(double maxX)
maxX
- Upper bound for the x column values. For non-numeric x
column, each x column item is mapped to an integral value
starting from 0.this
to mimic the builder pattern.public double getMinY()
public VisualizeImageChartRequest setMinY(double minY)
minY
- Lower bound for the y column values. For non-numeric y
column, each y column item is mapped to an integral value
starting from 0.this
to mimic the builder pattern.public double getMaxY()
public VisualizeImageChartRequest setMaxY(double maxY)
maxY
- Upper bound for the y column values. For non-numeric y
column, each y column item is mapped to an integral value
starting from 0.this
to mimic the builder pattern.public int getWidth()
public VisualizeImageChartRequest setWidth(int width)
width
- Width of the generated image in pixels.this
to mimic the builder pattern.public int getHeight()
public VisualizeImageChartRequest setHeight(int height)
height
- Height of the generated image in pixels.this
to mimic the builder pattern.public String getBgColor()
public VisualizeImageChartRequest setBgColor(String bgColor)
bgColor
- Background color of the generated image.this
to mimic the builder pattern.public Map<String,List<String>> getStyleOptions()
POINTCOLOR
: The color of points in the plot represented as a
hexadecimal number.
POINTSIZE
: The size of points in the plot represented as number
of pixels.
POINTSHAPE
: The shape of points in the plot.
Supported values:
The default value is SQUARE
.
CB_POINTCOLORS
: Point color class break information consisting
of three entries: class-break attribute, class-break
values/ranges, and point color values. This option overrides the
pointcolor option if both are provided. Class-break ranges are
represented in the form of "min:max". Class-break values/ranges
and point color values are separated by cb_delimiter, e.g.
{"price", "20:30;30:40;40:50", "0xFF0000;0x00FF00;0x0000FF"}.
CB_POINTSIZES
: Point size class break information consisting of
three entries: class-break attribute, class-break values/ranges,
and point size values. This option overrides the pointsize
option if both are provided. Class-break ranges are represented
in the form of "min:max". Class-break values/ranges and point
size values are separated by cb_delimiter, e.g. {"states",
"NY;TX;CA", "3;5;7"}.
CB_POINTSHAPES
: Point shape class break information consisting
of three entries: class-break attribute, class-break
values/ranges, and point shape names. This option overrides the
pointshape option if both are provided. Class-break ranges are
represented in the form of "min:max". Class-break values/ranges
and point shape names are separated by cb_delimiter, e.g.
{"states", "NY;TX;CA", "circle;square;diamond"}.
CB_DELIMITER
: A character or string which separates per-class
values in a class-break style option string.
X_ORDER_BY
: An expression or aggregate expression by which
non-numeric x column values are sorted, e.g. "avg(price)
descending".
Y_ORDER_BY
: An expression or aggregate expression by which
non-numeric y column values are sorted, e.g. "avg(price)", which
defaults to "avg(price) ascending".
JITTER_X
: Amplitude of horizontal jitter applied to non-numaric
x column values.
JITTER_Y
: Amplitude of vertical jitter applied to non-numaric y
column values.
PLOT_ALL
: If this options is set to "true", all non-numeric
column values are plotted ignoring min_x, max_x, min_y and max_y
parameters.
public VisualizeImageChartRequest setStyleOptions(Map<String,List<String>> styleOptions)
styleOptions
- Rendering style options for a chart.
POINTCOLOR
: The color of points in the plot
represented as a hexadecimal number.
POINTSIZE
: The size of points in the plot
represented as number of pixels.
POINTSHAPE
: The shape of points in the plot.
Supported values:
The default value is SQUARE
.
CB_POINTCOLORS
: Point color class break
information consisting of three entries:
class-break attribute, class-break values/ranges,
and point color values. This option overrides the
pointcolor option if both are provided. Class-break
ranges are represented in the form of "min:max".
Class-break values/ranges and point color values
are separated by cb_delimiter, e.g. {"price",
"20:30;30:40;40:50", "0xFF0000;0x00FF00;0x0000FF"}.
CB_POINTSIZES
: Point size class break information
consisting of three entries: class-break attribute,
class-break values/ranges, and point size values.
This option overrides the pointsize option if both
are provided. Class-break ranges are represented in
the form of "min:max". Class-break values/ranges
and point size values are separated by
cb_delimiter, e.g. {"states", "NY;TX;CA", "3;5;7"}.
CB_POINTSHAPES
: Point shape class break
information consisting of three entries:
class-break attribute, class-break values/ranges,
and point shape names. This option overrides the
pointshape option if both are provided. Class-break
ranges are represented in the form of "min:max".
Class-break values/ranges and point shape names are
separated by cb_delimiter, e.g. {"states",
"NY;TX;CA", "circle;square;diamond"}.
CB_DELIMITER
: A character or string which
separates per-class values in a class-break style
option string.
X_ORDER_BY
: An expression or aggregate expression
by which non-numeric x column values are sorted,
e.g. "avg(price) descending".
Y_ORDER_BY
: An expression or aggregate expression
by which non-numeric y column values are sorted,
e.g. "avg(price)", which defaults to "avg(price)
ascending".
JITTER_X
: Amplitude of horizontal jitter applied
to non-numaric x column values.
JITTER_Y
: Amplitude of vertical jitter applied to
non-numaric y column values.
PLOT_ALL
: If this options is set to "true", all
non-numeric column values are plotted ignoring
min_x, max_x, min_y and max_y parameters.
this
to mimic the builder pattern.public VisualizeImageChartRequest setOptions(Map<String,String> options)
options
- Optional parameters.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2018. All rights reserved.