You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It feels like the helper would need to know which options possibly represent channels, though. And there would potentially be ambiguity with alternative representations of data (such as Arquero objects #449); though that could be addressed by checking the number of arguments and whether the first is a plain object (Object.getPrototypeOf === Object.prototype).
The text was updated successfully, but these errors were encountered:
Possible approach, but I’m unsure how to generalize…
exportfunctiontext(data,options={}){if(arguments.length===1&&Object.getPrototypeOf(data)===Object.prototype){const{x, y, text, ...rest}=data;data={length: 1};options={...rest,x: x==null ? x : [x],y: y==null ? y : [y],text: text==null ? text : [text]};}const{x, y, ...rest}=options;if(options.frameAnchor===undefined)([x,y]=maybeTuple(x,y));returnnewText(data,{...rest, x, y});}
For single-instance marks, it’d be neat if you could just pass options without data. For example:
Could be equivalent to:
It feels like the helper would need to know which options possibly represent channels, though. And there would potentially be ambiguity with alternative representations of data (such as Arquero objects #449); though that could be addressed by checking the number of arguments and whether the first is a plain object (Object.getPrototypeOf === Object.prototype).
The text was updated successfully, but these errors were encountered: