Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawing multiple graphs #54

Closed
willyyang opened this issue Jun 21, 2016 · 11 comments
Closed

Drawing multiple graphs #54

willyyang opened this issue Jun 21, 2016 · 11 comments

Comments

@willyyang
Copy link

Hi there,

Is there a way to create multiple graphs? I can get one graph to render then the second one will be stuck in the Rendering Chart... phase.

I have an array of objects that have configurations/options for the graphs then I map this array to a component that calls <Chart />.

Am I missing something here to make multiple graphs show up? Thanks!

@willyyang
Copy link
Author

willyyang commented Jun 21, 2016

<div>
  <div id='project-margins'>
          {options.map(option => 
            <Chart
              chartType = 'ColumnChart'
              data ={data}
              options={option}
              graph_id = 'ColumnChart'
              width={'100%'}
              height={'400px'}
            />
          )}           
  </div>
</div>

@rakannimer
Copy link
Owner

rakannimer commented Jun 22, 2016

Hey,
It looks like you're using the same graph_id for the generated graphs.
Either use different ids for each or don't set one and it will
automatically generate graph_ids for you .

Hope that helps,
Cheers !

On Tue, 21 Jun 2016 at 20:59 willyyang notifications@github.com wrote:

{graphs.map(graph => )}
  </div>


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#54 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABNkfTzeqUaKK-Fdb8YHNtj0mY2wofL9ks5qOCaDgaJpZM4I7AS4
.

@willyyang
Copy link
Author

Doh. Thanks dude!

@rakannimer
Copy link
Owner

You're welcome :)

@anylyne
Copy link

anylyne commented Nov 14, 2018

I'm having the same issue even if I'm using a unique id for each graph or if I'm letting it generate the id itself. The version I'm using is 2.0.29.

@rakannimer
Copy link
Owner

Hey @anylyne,

Can you try updating to >=3.0

npm i react-google-charts@latest

and try again ?

Cheers !

@anylyne
Copy link

anylyne commented Nov 16, 2018

Thank you for your answer, @rakannimer!

I can't update because my project is using react 15.3.2. Is there any other option in this case?

Best,
Carol.

@anylyne
Copy link

anylyne commented Nov 16, 2018

@rakannimer More information about this issue in my environment:

  • It is working properly in my local. I mean all four graphs are loading simultaneously.
  • On staging, some of them renders and some not randomly.

@RachelMcNeely
Copy link

Hi @rakannimer,

I am also in the same boat as @anylyne - one chart renders while the others are stuck. However, when I navigate away and then back again, all charts render properly. I also can't update because my project uses React 15.6.2. Is there any other option besides updating >=3.0? Thanks!

@rakannimer
Copy link
Owner

Hey @anylyne & @RachelMcNeely ,

It would be very helpful if you can create a sandbox that reproduces the problem and I can try to help debug there ?

Cheers !

@josephjs1dev
Copy link

Hello, I'm also having same issue with this one. I want to render 3 charts, but it only renders 1 chart successfully while the other stuck at loading.

The version I'm using is 2.0.29 for react-google-charts and 15.3.1 for react.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants