Open curran opened 8 years ago
All these validations should eventually be implemented, but they do not block adoption of the chiasm-dataset data structure in other Chiasm modules. They do block complete testability though. Ideally, the completed validation function should be invoked as part of the tests for modules that adopt this data structure.
The constraints that must be validated upon invocation of this function include:
dataset
object has adata
property.data
is an array (not a string or number or any other type)data
is an array of objects, not of string or number or any other type.dataset
object must have ametadata
property.data
array.true
, then each of these column descriptor objects must not have the properties isDimension or interval.true
, then isCube must be set totrue
.true
and the column is of type "number" or "date", then interval must be defined.true
) andinterval
must be a number.interval
must be a string corresponding to one of the interval types defined in d3-time. This includes, for example, "minute", "hour", "day", "week", "month", and "year".domain[0]
) and the maximum (domain[1]
).Date
objects, the minimum (domain[0]
) and the maximum (domain[1]
).