DataScope
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.
Properties
property | explanation | type | default value |
---|---|---|---|
dataTable | the data table from which this data scope is created | DataTable | |
filters | returns field values used to filter a data table into the current data scope | Dictionary | |
fields | the field names in the filters | Array of Strings |
Methods
method | explanation | return type |
---|---|---|
clone() | returns a copy of the data scope | DataScope |
aggregateNumericalField(f, aggr) | aggregate the values of the specified numeric field in this data scope f (String): field aggr (String): aggregator | Number |
getFieldType(f) | returns the type of the specified field in this data scope | Data 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 scope | Boolean |
isEmpty() | returns true if the data scope contains no tuples | Boolean |