19

The purpose of my code is to use the range chart(bar chart) that shows the count of the datasets produced in years, to brush on the focus chart(line chart). The focus chart then displays the count on the monthly basis. My code is here . It seems to be working fine when I select a big range through the brush. However, when I select small range like: 1 or 2 bars, it shows me the following error

 Error: <g> attribute transform: Trailing garbage, "translate(0,NaN)".    d3.v3.min.js:4 

Moreover, it does not filter the focus chart as well then. I will appreciate any help

user3050590
  • 1,656
  • 4
  • 21
  • 40
  • 1
    your code on the plunker seems to work fine. I can get the error when i set the bars pretty much on top of each other. At some stage in your code you have a `g` element that you `translate` based on some 2 numbers. Whats happening here is that only one number is being passed in. d3 cant translate without numbers hence the error being thrown – Craicerjack Jun 17 '16 at 15:56
  • In my case, it was d3 being passed an empty array `[]` somewhere. – K3---rnc May 17 '17 at 16:55
  • Had the same issue and it was due to creating an axis based on a field that had numbers and strings (parsed empty strings as zero) – user5480949 Feb 05 '19 at 21:38

0 Answers0