X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=inline;f=src%2Fdygraph.js;fp=src%2Fdygraph.js;h=df6baf9bdea01a3693c6ca3e5f7ba3e5bd94de7d;hb=23b6c2e2d33b752d735f3b5d059d34440ff7f8c1;hp=735ddca0bddcd9085f8bc6ff0a1f915522d9f5f7;hpb=bf7d192b5aef6ea82e7e627d4cfcfca1cb978f23;p=dygraphs.git diff --git a/src/dygraph.js b/src/dygraph.js index 735ddca..df6baf9 100644 --- a/src/dygraph.js +++ b/src/dygraph.js @@ -3247,9 +3247,9 @@ Dygraph.prototype.parseDataTable_ = function(data) { this.attrs_.axes.x.ticker = Dygraph.numericTicks; this.attrs_.axes.x.axisLabelFormatter = this.attrs_.axes.x.valueFormatter; } else { - console.error("only 'date', 'datetime' and 'number' types are supported " + - "for column 1 of DataTable input (Got '" + indepType + "')"); - return null; + throw new Error( + "only 'date', 'datetime' and 'number' types are supported " + + "for column 1 of DataTable input (Got '" + indepType + "')"); } // Array of the column indices which contain data (and not annotations). @@ -3271,8 +3271,9 @@ Dygraph.prototype.parseDataTable_ = function(data) { } hasAnnotations = true; } else { - console.error("Only 'number' is supported as a dependent type with Gviz." + - " 'string' is only supported if displayAnnotations is true"); + throw new Error( + "Only 'number' is supported as a dependent type with Gviz." + + " 'string' is only supported if displayAnnotations is true"); } }