Giter Site home page Giter Site logo

phpchart's Introduction

PHPChart

A Simple PHPChart Library to draw Graphs and Pie Charts etc

How to Use

Include the Chart Class

include 'Chart.php';

Initialize the Class by adding Data to show in Array

$chart = new Chart(array(
    "Jan" => 110,
    "Feb" => 130,
    "Mar" => 215,
    "Apr" => 81,
    "May" => 310,
    "Jun" => 110,
    "Jul" => 190,
    "Aug" => 175,
    "Sep" => 390,
    "Oct" => 286,
    "Nov" => 150,
    "Dec" => 196
));

Finally Call the drawBar method to draw bar

$chart->drawBar();

Example

A simple Bar Graph Bar Graph

How to Use

Include the Chart Class

include 'Chart.php';

Initialize the Class by adding Data to show in Array

$chart = new Chart(array(
    "Jan" => 110,
    "Feb" => 130,
    "Mar" => 215,
    "Apr" => 81,
    "May" => 310,
    "Jun" => 110,
    "Jul" => 190,
    "Aug" => 175,
    "Sep" => 390,
    "Oct" => 286,
    "Nov" => 150,
    "Dec" => 196
));

Finally Call the drawPie method to draw Pie Graph

$chart->drawPie();

Example

A simple PIe Graph Pie Graph

How to Use

Include the Chart Class

include 'Chart.php';

Initialize the Class by adding Data to show in Array

$chart = new Chart(array(
    "Jan" => 110,
    "Feb" => 130,
    "Mar" => 215,
    "Apr" => 81,
    "May" => 310,
    "Jun" => 110,
    "Jul" => 190,
    "Aug" => 175,
    "Sep" => 390,
    "Oct" => 286,
    "Nov" => 150,
    "Dec" => 196
));

Finally Call the drawLine method to draw Line Graph

$chart->drawLine();

Example

A simple Line Graph Line Graph

How to Use

Include the Chart Class

include 'Chart.php';

Initialize the Class by adding Data to show in Array

$chart = new Chart(array(
    "Jan" => array("Google"=>87.5, "Yahoo" =>32.8, "Bing" =>12.6, "iSearch"=>43),
    "Feb" =>  array("Google"=>82.5, "Yahoo" =>60.8, "Bing" =>65.6, "iSearch"=>23),
    "Mar" =>  array("Google"=>52, "Yahoo" =>71.8, "Bing" =>83.2, "iSearch"=>63),
    "Apr" =>  array("Google"=>91, "Yahoo" =>33.8, "Bing" =>69.2, "iSearch"=>53)
));

Finally Call the drawmultiLine method to draw multiLine Graph

$chart->drawmultiLine();

Example

A simple MultiLine Graph Line Graph

phpchart's People

Contributors

faizanayubi avatar merajsiddiqui avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.