MCPcopy Index your code
hub / github.com/microsoft/SandDance / render

Method render

docs/app/js/sanddance-app.js:9619–9648  ·  view source on GitHub ↗

* Render data into a visualization. * @param insight Object to create a visualization specification. * @param data Array of data objects. * @param view Optional View to specify camera type. * @param ordinalMap Optional map of ordinals to assign to the data such that the same cube

(insight, data, options = {})

Source from the content-addressed store, hash-verified

9617 * @param view Optional View to specify camera type.
9618 * @param ordinalMap Optional map of ordinals to assign to the data such that the same cubes can be re-used for new data.
9619 */ render(insight, data, options = {}) {
9620 return __awaiter(this, void 0, void 0, function*() {
9621 let result;
9622 //see if refine expression has changed
9623 if (!_searchExpression.compare(insight.filter, this.insight.filter)) {
9624 const allowAsyncRenderTime = 100;
9625 if (insight.filter) {
9626 //refining
9627 result = yield this._render(insight, data, options, true);
9628 this.presenter.animationQueue(()=>{
9629 this.filter(insight.filter, options.rebaseFilter && options.rebaseFilter());
9630 }, allowAsyncRenderTime, {
9631 waitingLabel: "layout before refine",
9632 handlerLabel: "refine after layout"
9633 });
9634 } else {
9635 //not refining
9636 this._dataScope.setFilteredData(null);
9637 result = yield this._render(insight, data, options, true);
9638 this.presenter.animationQueue(()=>{
9639 this.reset();
9640 }, allowAsyncRenderTime, {
9641 waitingLabel: "layout before reset",
9642 handlerLabel: "reset after layout"
9643 });
9644 }
9645 } else result = yield this._render(insight, data, options, false);
9646 return result;
9647 });
9648 }
9649 shouldViewstateTransition(newInsight, oldInsight) {
9650 if (!oldInsight.columns) return false;
9651 if (oldInsight.chart !== newInsight.chart) return true;

Callers 8

sanddance-app.jsFile · 0.45
_renderMethod · 0.45
activateMethod · 0.45
deActivateMethod · 0.45
layoutMethod · 0.45
applyColorButtonsFunction · 0.45
renderAsyncFunction · 0.45
finishClassComponentFunction · 0.45

Calls 6

_renderMethod · 0.95
filterMethod · 0.95
resetMethod · 0.95
__awaiterFunction · 0.85
animationQueueMethod · 0.45
setFilteredDataMethod · 0.45

Tested by

no test coverage detected