The DataScope class represents data that is joined with a graphical object (i.e., mark or group). A DataScope object contains a subset of the tuples in a data table. DataScope objects are created and assigned to graphical objects through the repeat, divide, and densify methods in the Scene class.


propertyexplanationtypedefault value
dataTable the data table from which this data scope is createdDataTable
filters returns field values used to filter a data table
into the current data scope
fields the field names in the filtersArray of Strings


methodexplanationreturn type
clone()returns a copy of the data scopeDataScope
aggregateNumericalField(f, aggr)aggregate the values of the specified numeric field in this data scope
f (String): field
aggr (String): aggregator
getFieldType(f)returns the type of the specified field in this data scopeData Type
getFieldValue(f)returns the value of the specified field in this data scope
hasField(f)returns true of the specified field exists in the data scopeBoolean
isEmpty()returns true if the data scope contains no tuplesBoolean