WebSite-PHP Framework PHP
Multi langues
Mode Ajax simple
Aucun HTML, aucun JavaScript
URL rewrinting
Envoi d'email
Sitemap - RSS - Web service
Télécharger le Framework WebSite-PHP maintenant
 


Loading
 


Tutorial : Chart with legend

Tutoriels

>

Tutoriel Graphic

>

Tutorial : Chart with legend


Graphic-02: Tutoriel du composants Graphic du FrameWork PHP WebSite-PHP.

Tutorial : Chart with legend:



Retourner aux tutoriels du composants Graphic



Code source

Code source



Pour utiliser Graphic vous devez vous connecter à l'interface administrateur du framework WebSite-PHP.

Une fois connecté vous devrez aller dans le menu configuration -> Configurer modules et activer le module Graphic.



Fichier: /pages/tutorials/graphic/graphic-02.php

<?php
class Graphic02 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Chart with legend";
        
        
$this->render = new Chart("chart-02");
        
        
// 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);
        
$this->render->addPoints("Data 2"
                                
$array_chart_data2);
        
$this->render->addPoints("Data 3"
                                
$array_chart_data3);
                                
        
// display legend
        
$this->render->setLegend();
    }
}
?>


Retourner aux tutoriels du composants Graphic


Share

 


Copyright © 2009-2024 WebSite-PHP Framework PHP
Accueil Documentation Télécharger Quick start Tutoriels Wiki Issue Tracker