mlarosa2 / parcoords

11 stars 2 forks source link

Uncaught TypeError: Cannot read property 'brush' of undefined #3

Open billyfung opened 7 years ago

billyfung commented 7 years ago

Not sure if I'm just not using the library properly, but I can't seem to get a brushable parcoords plot using this modified code. I'm using d3.v4 4.8.0 and trying to do

var data = [
  [0,-0,0,0,0,3 ],
  [1,-1,1,2,1,6 ],
  [2,-2,4,4,0.5,2],
  [3,-3,9,6,0.33,4],
  [4,-4,16,8,0.25,9]
];

var pc = d3.parcoords()("#example")
  .data(data)
  .render()
  .createAxes()
  .brushMode("1D-axes") // enable brushing
  .interactive();  // command line mode;
Uncaught TypeError: Cannot read property 'brush' of undefined
    at brushFor (d3_v4.parcoords.js)
    at SVGGElement.<anonymous> (d3_v4.parcoords.js)
    at vt.ul [as each] (d3.min.js:4)
    at Object.install (d3_v4.parcoords.js)
    at Function.pc.brushMode (d3_v4.parcoords.js)
    at test:264

I'm very new to JS and d3, so it could potentially be something else.

Thanks

mlarosa2 commented 7 years ago

I will take a look at this this weekend and get back to you. Thanks!

nestordi commented 6 years ago

Same here: undefined is not an object (evaluating 'd3.svg.brush'). Were you able to check if this is possible to fix? thanks!

sumit140 commented 6 years ago

@mlarosa2 :Are your able to fixed that issue ..I am getting same error (uncaught ReferenceError: d3Brush is not defined at brushFor (d3_v4.parcoords.js:1630))

when i am using d3 v4 with d3_v4.parcoords.js.Could you please suggest any workaround for this if possible..

lnagaprasad commented 4 years ago

is above issue is fixed ?