When querying for data, there are situations where the returned data-set is empty for certain time ranges. Such a situation occurred in Vega (returned an empty array) and I tried to create a condition using expressions to check if the data-set is empty but it doesn't seem to work.
length(data('table')) == 0 ? '-' : datum.sum
Adding the above test condition in a formula transform says Undefined data set name: "table"
. Nothing seems to change when it is used inside a mark as a signal for a field.
How to check if the returned data-set is empty so that a condition can be applied to do a specific task accordingly? Your kind help would be appreciated.
Note: Vega v 4.3.0