Search code examples
javascriptangularjsd3.jsnvd3.jsangular-nvd3

<g> attribute transform="translate(NaN,NaN)" when using Interactive Guideline


I am currently working with NVD3 using Angular Directive (angular-nvd3). I have a very simple line chart with very simple data.

Everything is working fine, at the beginning. However if you decide to turn off (disable) one set of data the error rises:

Error: Invalid value for <g> attribute transform="translate(NaN,NaN)"

I replicated the problem with a plunker: http://plnkr.co/edit/e4D619?p=preview

Disable any set to see the error in console. Resize the window and disable/enable the set to see the error again. Turn off useInteractiveGuideline to eliminate the errors.

Still, I do not know if it is a bug with nvd3 or d3 or with the dataset somehow. Any suggestions appreciated.


Solution

  • The bug was reported and is already solved in master:

    https://github.com/novus/nvd3/issues/1373#event-475991935