Skip to content

Multiple charts on a single page?

Question:
I'm trying to have multiple charts on one page but both charts are drawing on top of each other so I'm left with a blurry single chart.

Answer:
Just make sure you give each graph an unique name on constructor. See http://phpchart.org/examples/introduction/  

  • The first line is to create our phpChart object by calling the constructor with two parameters;
    • the 1st parameter is the data, which must be an array of y values or array of paired [x, y]
    • The 2nd parameter is the unique name for the chart. The unique name cannot have letter space.

If you are using phpChart Lite, please note that only a single chart is supported in the free Lite version.

Feedback and Knowledge Base