use of io.deephaven.web.client.api.widget.plot.JsFigure in project deephaven-core by deephaven.
the class WorkerConnection method getFigure.
public Promise<JsFigure> getFigure(JsVariableDefinition varDef) {
if (!varDef.getType().equals("Figure")) {
throw new IllegalArgumentException("Can't load as a figure: " + varDef.getType());
}
return whenServerReady("get a figure").then(server -> new JsFigure(this, c -> {
FetchObjectRequest request = new FetchObjectRequest();
TypedTicket typedTicket = new TypedTicket();
typedTicket.setTicket(TableTicket.createTicket(varDef));
typedTicket.setType(varDef.getType());
request.setSourceId(typedTicket);
objectServiceClient().fetchObject(request, metadata(), c::apply);
}).refetch());
}
Aggregations