Skip to content

haresh-vidja/google-chart-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

GoogleChartRenderer PHP Demo

Overview

This demo shows how to use the GoogleChartRenderer PHP class to dynamically render all types of Google Charts.

Files

  • src/GoogleChartRenderer.php - The reusable chart rendering class
  • src/index.php - Sample usage rendering a Pie Chart

Requirements

  • PHP 7.x or higher
  • A web server (e.g., Apache, Nginx) or PHP's built-in server

Running the Demo

Option 1: PHP Built-in Server

php -S localhost:8000 -t src

Then open your browser at: http://localhost:8000

Option 2: Deploy to Web Server

Upload the src/ directory to your web server's root and access index.php.

Customizing the Chart

In index.php, you can change:

  • new GoogleChartRenderer('chartId', 'ChartType')
  • Chart types: PieChart, BarChart, GeoChart, LineChart, etc.
  • addColumn(type, label) for defining columns
  • addRow([data]) to add chart data
  • setOptions([]) to customize appearance

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages