PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Jonas Schneider  >  SVG Graph  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Simple example script, not yet works
Class: SVG Graph
Generate various types of charts in SVG format
Author: By
Last change:
Date: 16 years ago
Size: 675 bytes


Class file image Download
* Test case for the {@link Chart} class.
* @package Chart_Tests


$data = array(new Chart_Data(50, "Kleiner"), new Chart_Data(150, "Mittel"), new Chart_Data(250, "Sehr groß"), new Chart_Data(20, "Furchtbar tiny"),);

$chart = new Chart($data);
$content = $chart->get("pie", array("x" => 100, "y" => 100, "legend" => ""));
$content .= $chart->get("bar_across", array("x" => 500, "y" => 200));
$content = $chart->encapsulate($content);

$fh = fopen("temp.svg", "w");
fwrite($fh, $content);
<embed src="temp.svg" width="1300" height="450" type="image/svg-xml">

For more information send a message to info at phpclasses dot org.