WebSite-PHP Framework PHP
Multi language
Simple Ajax mode
No HTML, no JavaScript
URL rewriting
Mail sending
Sitemap - RSS - Web service
Download WebSite-PHP FrameWork now
 


Loading
 


Tutorial : Chart with other design

Tutorials

>

Tutorial Graphic

>

Tutorial : Chart with other design


Graphic-05: Tutorial of the composant Graphic of the PHP FrameWork WebSite-PHP.

Tutorial : Chart with other design:



Go back to tutorial of the componant Graphic



Source code

Source code



To use Graphic, you need to connect to the admin interface of the framework WebSite-PHP.

Once connected you will go to the menu Configuration -> Configure modules and enable the module Graphic.



File: /pages/tutorials/graphic/graphic-05.php

<?php
class Graphic05 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Chart with other design";
        
        
$this->render = new Chart("chart-05");
        
        
// init data
        
$array_chart_data = array();
        
$array_chart_data2 = array();
        
$array_chart_data3 = array();
        for (
$i=0$i 12$i++) {
            
$array_chart_data[] = array($irand(099));
            
$array_chart_data2[] = array($irand(099));
            
$array_chart_data3[] = array($irand(099));
        }
        
        
// set points of the graphics
        
$this->render->addPoints("Data 1"
                                
$array_chart_data,
                                
Chart::DESIGN_LINES_POINTS_WITH_STEPS);
        
$this->render->addPoints("Data 2"
                                
$array_chart_data2,
                                
Chart::DESIGN_LINES_WITH_STEPS);
        
$this->render->addPoints("Data 3"
                                
$array_chart_data3,
                                
Chart::DESIGN_POINTS);
                                
        
// display legend
        
$this->render->setLegend();
    }
}
?>


Go back to tutorial of the componant Graphic


Share

 


Copyright © 2009-2024 WebSite-PHP Framework PHP
Home Documentation Download Quick start Tutorials Wiki Issue Tracker