From b6755666f39590f753ee879959a4dd20530ce0f5 Mon Sep 17 00:00:00 2001 From: gnardecky Date: Mon, 12 Jun 2017 14:59:18 -0700 Subject: [PATCH] Create README.md Base case example needed code in the example. --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 34a5c12..ed0f1fc 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,29 @@ The purpose of this wrapper is to enable PHP users to quickly and easily create 3. Copy file "zc.php" into your project's source directory. 4. Include the ZingChart library in your project ``. 5. Include this wrapper in your project using the 'include' syntax. ie) `include zc.php`. +6. After the include use the proper namespace in your code: `use ZingChart\PHPWrapper\ZC;`. + +```php +include 'zc.php'; +use ZingChart\PHPWrapper\ZC; + +$datay = array(); +$a= 6.619; +$b= 0.113; +$index=0; +for($x=50; $x < 600; $x += 50, $index++) { +array_push($datay, $a + $b*$x); +} + + +$zc = new ZC("myChart"); +$zc->setChartType("line"); +$zc->setTitle("PHP 5.6 render"); +$zc->setSeriesData(0, $datay); +$zc->setChartHeight("400px"); +$zc->setChartWidth("100%"); +$zc->render(); +``` ### Composer We are on Packagist [here](https://packagist.org/packages/zingchart/php_wrapper).