The body of your loop for i is 1 to 3 is drawing 3 charts, all with the same id: chart_div + i. So all three charts are drawn on top of the previous one for the first time through the loop when the id is chart_div1. Then the second time the id is chart_div2 for all three charts.
But it sounds like you only want 3 charts altogether. If so, then you either want to get rid of the JavaScript for loop or the PHP foreach loop. On Sun, Jun 18, 2017 at 4:35 PM, Imraan Nasir <[email protected]> wrote: > What keeps happening is the same graph is generated for all 3 instances of > the graph > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to google-visualization-api@ > googlegroups.com. > Visit this group at https://groups.google.com/ > group/google-visualization-api. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/google-visualization-api/188136b0-625c-4bc5-a05e- > 03523aeb93b4%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/188136b0-625c-4bc5-a05e-03523aeb93b4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJOjsZcUggWdjAb2TS%3DZrcuAJK0vqOMFJ6H76Xxw%3DtGspw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
