var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, opts);
};
+
+pathologicalCasesTestCase.prototype.testNullLegend = function() {
+ var opts = {
+ width: 480,
+ height: 320,
+ labelsDiv: null
+ };
+ var data = "X,Y\n" +
+ "1,2\n";
+
+ var graph = document.getElementById("graph");
+ var g = new Dygraph(graph, data, opts);
+};
*/
Dygraph.prototype.setLegendHTML_ = function(x, sel_points) {
var labelsDiv = this.attr_("labelsDiv");
+ if (!labelsDiv) return;
+
var sizeSpan = document.createElement('span');
// Calculates the width of 1em in pixels for the legend.
sizeSpan.setAttribute('style', 'margin: 0; padding: 0 0 0 1em; border: 0;');