We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9ce97e0 + 279e5f7 commit 082427dCopy full SHA for 082427d
src/ChartJS/widgets/Core.js
@@ -131,14 +131,18 @@ define([
131
if (this._handle !== null) {
132
mx.data.unsubscribe(this._handle);
133
}
134
- this._handle = mx.data.subscribe({
135
- guid: this._mxObj.getGuid(),
136
- callback: lang.hitch(this, this._loadData)
137
- });
138
-
139
- // Load data again.
140
- this._loadData();
141
+ if(this._mxObj) {
+ this._handle = mx.data.subscribe({
+ guid: this._mxObj.getGuid(),
+ callback: lang.hitch(this, this._loadData)
+ });
+
+ // Load data again.
+ this._loadData();
142
+ domStyle.set(this.domNode, "display", "");
143
+ } else {
144
+ domStyle.set(this.domNode, "display", "none");
145
+ }
146
if (typeof callback !== "undefined") {
147
callback();
148
0 commit comments