// DOM objects are shallowly-copied.
self[k] = o[k];
} else if (typeof(o[k]) == 'object') {
- if (typeof(self[k]) != 'object') {
+ if (typeof(self[k]) != 'object' || self[k] === null) {
self[k] = {};
}
Dygraph.updateDeep(self[k], o[k]);
if (!this.is_generated_div_) return;
// TODO(danvk): only use real APIs for this.
+ e.dygraph.graphDiv.appendChild(this.legend_div_);
var area = e.dygraph.plotter_.area;
this.legend_div_.style.left = area.x + area.w - e.dygraph.getOption("labelsDivWidth") - 1 + "px";
this.legend_div_.style.top = area.y + "px";