Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

338
Views
r2d3 - error when resizing chart in "viewer" pane in R

I have a chart which I've built using d3 (r2d3 in R). This is d3 v3. The chart renders just fine, but whenever I resize the viewer pane, I get the following error:

Error: t.slice is not a function in (script.js#301:6)
TypeError: t.slice is not a function
at Jn (d3.min.js:1:18267)
at e (d3.min.js:1:15373)
at Function.t.parse (d3.min.js:1:14782)
at r2d3-script-642:308:21
at Array.forEach (<anonymous>)

The line(s) in question:

var format = d3.time.format("%Y-%m-%d")

data.forEach(function (d) {
  d.letter = format.parse(d.letter);
  console.log(d.letter)
});

console.log(data)

Again, in the viewer pane in R Studio, it works absolutely fine but only gives this error when the viewer is re-sized. In HTML, it can re-size no problem with no error.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!