Skip to content

Commit

Permalink
provide warning if columns arity does not match Fixes jupyter#83
Browse files Browse the repository at this point in the history
(c) Copyright IBM Corp. 2015
  • Loading branch information
peller committed Nov 6, 2015
1 parent 561d9ea commit 6a7910b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion elements/urth-viz-chart/urth-viz-chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@
},

behaviors: [
Polymer.IronResizableBehavior
Polymer.IronResizableBehavior,
Urth.JupyterWidgetBehavior
],

listeners: {
Expand Down Expand Up @@ -205,6 +206,10 @@
primary = primary || this.primary;
secondary = secondary || this.secondary;

if (this.columns.length && datarows[0] && this.columns.length != datarows[0].length) {
this.displayErrorMessage("Warning: arity of columns does not match data");
}

var columnSettings = this.columnSettings;
var values = (datarows[0] || []).map(function (rows, i) {
var t = function (d, i) {
Expand Down

0 comments on commit 6a7910b

Please sign in to comment.