URL: http://GPUDB_IP_ADDRESS:GPUDB_PORT/visualize/image/chart
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 output parameter image_data field.
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
table_name | string | Name of the table containing the data to be drawn as a chart. | ||||||||||||||||||||||||||||||||||||||||||||
x_column_names | array of strings | Names of the columns containing the data mapped to the x axis of a chart. | ||||||||||||||||||||||||||||||||||||||||||||
y_column_names | array of strings | Names of the columns containing the data mapped to the y axis of a chart. | ||||||||||||||||||||||||||||||||||||||||||||
min_x | double | 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. | ||||||||||||||||||||||||||||||||||||||||||||
max_x | double | 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. | ||||||||||||||||||||||||||||||||||||||||||||
min_y | double | 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. | ||||||||||||||||||||||||||||||||||||||||||||
max_y | double | 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 | int | Width of the generated image in pixels. | ||||||||||||||||||||||||||||||||||||||||||||
height | int | Height of the generated image in pixels. | ||||||||||||||||||||||||||||||||||||||||||||
bg_color | string | Background color of the generated image. | ||||||||||||||||||||||||||||||||||||||||||||
style_options | map of string to arrays of strings | Rendering style options for a chart.
|
||||||||||||||||||||||||||||||||||||||||||||
options | map of string to strings | Optional parameters. The default value is an empty map ( {} ). |
The GPUdb server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
status | String | 'OK' or 'ERROR' | ||||||||||||||||||||||||||||||||||||||||
message | String | Empty if success or an error message | ||||||||||||||||||||||||||||||||||||||||
data_type | String | 'visualize_image_chart_request' or 'none' in case of an error | ||||||||||||||||||||||||||||||||||||||||
data | String | Empty string | ||||||||||||||||||||||||||||||||||||||||
data_str | JSON or String | This embedded JSON represents the result of the /visualize/image/chart endpoint:
Empty string in case of an error. |