goog_y, which are renamed
y, and rowid, which is a requirement for hit-testing.
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
tweetsfor 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.
heightproperties define a visualization area
384pixels wide and
scalesposition encoding properties map the
marksinto this visualization area.
marksproperty defines visualization geometric primitives. The OmniSci Vega implementation defines the following primitive types:
symbolA geometric symbol, such as a circle or square
xThe x position of the point in pixels.
yThe y position of the point in pixels.
zThe depth coordinate of the point in pixels.
fillColorThe color of the point.
fillOpacityThe opacity of the fill, from transparent (
0) to opaque (
opacityThe opacity of the point as a whole, from transparent (
0) to opaque (
sizeThe diameter of the point in pixels.
tweetsSQL data and use the
ycolumns 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
blueand point size is set to three pixels.
scalesdefinition maps data domain values to visual range values, where the
domainproperty determines the input domain for the scale. See the d3-scale reference for background information about how scaling works.
linearinterpolation to map point x- and y-coordinates to the
heightof the viewing area. The
heightproperties are predefined keywords that equate to the range
[0, <current width>]and
[0, <current height>].
MapdConobject for connecting to the backend.
renderVega()callback function to
connect()and include the Vega specification as a parameter.
MapdCon()parameters according to match your host environment and database.