PHP Classes

File: src/usage3.php

Recommend this page to a friend!
  Classes of Win Aung Cho   PHP Plot Chart   src/usage3.php   Download  
File: src/usage3.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Plot Chart
Generate chart image from a list of data points
Author: By
Last change: Update of src/usage3.php
Date: 1 year ago
Size: 544 bytes
 

Contents

Class file image Download
<?php
include("plotChart.php");
   
$data = [
       
u => [
            [-
100, -45000],
            [
0, 60000],
            [
200, 360000],
            [
400, -260000],
            [
480, 80000]
        ]
    ];
   
$setting = [
       
"strtitle" => "Title is updated",
       
strstitle => "Subtitle",
       
ngy => 7,
       
ngx => 10
   
];
    echo
"<h1>Usage 3</h1>";
   
$plotchart = new PlotChart($setting);
   
$plotchart->fitGraph($data);
   
$plotchart->drawGrid();
   
$plotchart->plotGraph($data);
   
$plotchart->viewImage();
?>