in src/visual.ts [160:186]
private static getValue<T>(
object: DataViewObject,
propertyName: string,
defaultValue?: T,
instanceId?: string): T {
if (!object)
return defaultValue;
if (instanceId) {
const instances = object.$instances;
if (!instances)
return defaultValue;
const instance = instances[instanceId];
if (!instance)
return defaultValue;
object = instance;
}
let propertyValue = <T>object[propertyName];
if (propertyValue === undefined)
return defaultValue;
return propertyValue;
}