novus/nvd3 — pull request #125 by mjc (2013-04-24 17:26:03+00:00)
Title: Fix onresize error with no chart on page

When loading nv3d without creating a chart, ```nv.utils.windowResize``` is called somewhere with an undefined argument, so we should check if it is undefined and not try to replace the old event handler, otherwise every resize event generates an error because ```fun``` is undefined.

I was able to produce by including the following libs and triggering onresize events.

```
nvd3/lib/d3.v2.js
nvd3/src/core.js
nvd3/src/tooltip.js
nvd3/src/utils.js
nvd3/src/models/lineWithFocusChart.js
nvd3/src/models/legend.js
nvd3/src/models/axis.js
nvd3/src/models/line.js
nvd3/src/models/scatter.js
```

Sponsored-by: CentroNet Marketing