question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when having multiple charts

See original GitHub issue

I use next.js and react-google-charts - both on latest version.

When i have multiple charts on a page, it throws me the following error g-charts

All the charts still work.

Example code in next.js:

import { Chart } from 'react-google-charts'

export default () => (
  <div>
    <Chart
      chartType="ScatterChart"
      data={[['Age', 'Weight'], [8, 12], [4, 5.5]]}
      options={{}}
      graph_id="ScatterChart1"
      width="100%"
      height="400px"
      legend_toggle
    />
    <Chart
      chartType="ScatterChart"
      data={[['Age', 'Weight'], [8, 12], [4, 5.5]]}
      options={{}}
      graph_id="ScatterChart2"
      width="100%"
      height="400px"
      legend_toggle
    />
  </div>
)

And thanks for this awesome wrapper btw, it plays a vital part in our site at https://bigfive-test.com

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
FabianSchuesslercommented, May 27, 2018

This issue was only fixed for multiple charts on one page. The issue still persists for charts on different pages.

1reaction
deepfriedbraincommented, May 26, 2018

It is better now but I’m still getting the errors in some cases:

Before 1.6.6:

Navigate to Component1, which has 4 charts: I would get the error 4 times. Navigate to Component2, which has 3 charts, I would get 3 more errors. Total 7 errors in the console.

With 1.6.6:

Navigate to Component1, which has 4 charts: No error. Navigate to Component2, which has 3 charts, I get 1 error. Total 1 error in the console.

So it has improved but not completed fixed yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chart.js multiple charts in same page(Working but still getting ...
I'm trying to use to charts on the same page. It is working but I'm still getting an error in my console log:...
Read more >
Multi Chart Error (**SOLVED in SAM 6.2**) - Forum
I've had this issue with trying to save the Multi Chart after configuring it for some time now, but never really pursued fixing...
Read more >
Error Charts with multiple datasets and errors - CanvasJS.com
Hi,. Currently, I'm facing an issue with creating error chart with multiple datasets. While providining multiple datasets everythign seems ...
Read more >
Error when rerendering multiple charts at once
DevExpress Support Team: CLONED FROM T566345: Error when rerendering multiple charts at once] Hi Gosha, I am getting the same error in cons....
Read more >
Error on create multiple charts in same page | ASP.NET MVC
Hi,. I'm trying to create two similar graphics on the same page. However when I enter the data with javascript an error occurs....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found