Error: <g> attribute transform: Trailing garbage, "translate(0,NaN)" on dc.js brushing
Asked Answered
S

0

21

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

Sibilla answered 15/5, 2016 at 23:51 Comment(3)
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 thrownEvaporate
In my case, it was d3 being passed an empty array [] somewhere.Demibastion
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)Selfgoverned

© 2022 - 2024 — McMap. All rights reserved.