Skip to content

Commit 205f6a2

Browse files
author
Jelte Lagendijk
committed
Fix _loadData error
1 parent 13aa66e commit 205f6a2

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/ChartJS/widgets/Core.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ define([
6161

6262
startup: function () {
6363
// Uncomment line to start debugging
64-
//logger.level(logger.DEBUG);
64+
//logger.level(logger.DEBUG);
6565
logger.debug(this.id + ".startup");
6666

6767
var domNode = null;
@@ -154,14 +154,20 @@ define([
154154
var obj = objs[0], // Chart object is always only one.
155155
j = null,
156156
dataset = null,
157-
pointguids = null;
157+
pointguids = null,
158+
guids = obj.get(this._dataset);
158159

159160
this._data.object = obj;
160161
this._data.datasets = [];
161162

163+
if (!guids) {
164+
logger.warn(this.id + "._loadData failed, no _dataset. Not rendering Chart");
165+
return;
166+
}
167+
162168
// Retrieve datasets
163169
mx.data.get({
164-
guids: obj.get(this._dataset),
170+
guids: guids,
165171
callback: lang.hitch(this, function (datasets) {
166172
var set = {};
167173

test/widgets/ChartJS.mpk

56 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)