Tag Archives: lines

PHP Lines graph script

Since I was tired of creating ugly bar graphs I decided to explore an easy way to create a lines graph, mostly inspired by Google Analytics graphs. Ok nothing so advanced but the result is quite nice for my needs.

You can configure the image created by the script using the following parameters:

  • w: width of the graph
  • h: height of the graph
  • points: array of values separated by commas representing the points in the graph
  • labels: array of labels separated by commas to be displayed horizontally
  • rows: number of rows
  • color: the desired color in rgb format, values separated by commas
  • style: 1) bordered circle endpoints 2) filled circles endpoints

Following a couple of examples with parameters used:


Continue reading