goog_x
and goog_y
, which are renamed x
and y
, and rowid, which is a requirement for hit-testing.height
and width
, which define the height and width of the visualization area.data
, which defines the data source. The SQL data described above is defined here with the label tweets
for later referencing.marks
, which describes the geometric primitives used to render the visualization.scales
, which are referenced by marks to map input domain values to appropriate output range values.width
and height
properties define a visualization area 384
pixels wide and 564
pixels high:scales
position encoding properties map the marks
into this visualization area.marks
property defines visualization geometric primitives. The OmniSci Vega implementation defines the following primitive types:lines
A linepoints
A pointpolys
A polygonsymbol
A geometric symbol, such as a circle or squaretweets
data:x
The x position of the point in pixels.y
The y position of the point in pixels.z
The depth coordinate of the point in pixels.fillColor
The color of the point.fillOpacity
The opacity of the fill, from transparent (0
) to opaque (1
).opacity
The opacity of the point as a whole, from transparent (0
) to opaque (1
).size
The diameter of the point in pixels.tweets
SQL data and use the x
and y
columns from the SQL to drive the position of the points. The positions are appropriately mapped to the visualization area using scales as described in Scale Input Domain to Output Range. The fill color is set to blue
and point size is set to three pixels.scales
definition maps data domain values to visual range values, where the domain
property determines the input domain for the scale. See the d3-scale reference for background information about how scaling works.x
and y
scales use linear
interpolation to map point x- and y-coordinates to the width
and height
of the viewing area. The width
and height
properties are predefined keywords that equate to the range [0, <current width>]
and [0, <current height>]
.MapdCon
object for connecting to the backend.renderVega()
callback function to connect()
and include the Vega specification as a parameter.renderVega()
function:MapdCon()
parameters according to match your host environment and database.