Thursday, 27 October 2016

Capaian data dalam bentuk soalan dan jawapan dari table-table berkaitan

*Paparan capaian data dalam bentuk soalan dan jawapan dari  table-table berkaitan*

1) Berikut adalah gambarajah yang terdiri daripada  data bentuk soalan serta data jawapan dalam table1 dan table2 serta contoh gambarajah yang memaparkan data dari table pangkalan data.


(Table1 data soalan)

(Paparan data soalan)

(Table2 data jawapan mengikut kodSoalSelidik dari Table1)

(Paparan data jawapan mengikut kodSoalSelidik1 dan kodJwpsoalselidik1)

 (Paparan data jawapan mengikut kodSoalSelidik2 dan kodJwpsoalselidik2)

(Paparan data jawapan mengikut kodSoalSelidik3 dan kodJwpsoalselidik3)


2) Seterusnya disertakan koding  bagi menghasilkan paparan seperti gambarajah di atas.


  (Paparan koding dalam controller)
 
 (Paparan koding dalam view)



    Nama : C. Nanthini
    Sistem yang diaplikasikan : Health Integrated Data Application 

Wednesday, 26 October 2016

Paparan Mesej Sebelum Laporan Sebenar Di Sistem Anda

*Keperluan untuk mendapatkan contoh paparan seperti dalam Sistem ePatuh dan tambahan koding mesej hilang dari skrin sehingga laporan dipaparkan*



1) Setiap button memegang id masing-masing. Button 'Jana Laporan' memegang 'id genReport' yang menghasilkan paparan laporan.


 



2) Apabila button 'Jana Laporan' diklik, maka mesej 'Laporan sedang dijana. Sila Tunggu.....' dipaparkan sebelum paparan laporan sebenar.






3) Berikut adalah cara pengekodan dimana Layout div class 'log' diletak sebelum paparan div class'generateReport_monthly' dalam body HTML.






   4) Seterusnya, di '<script>' atau '<script type="text/javascript">' mengikut id button yang berkenaan iaitu genReport (Button Jana Laporan), sila letakkan koding '$ (".log").text ('Laporan sedang dijana. Sila Tunggu');' dan '$ (".log").show()'  serta '$ (".log").hide()'  di bawah 'div dengan id generateReport_monthly'.





5)  Keterangan bagi koding di no. 4 yang terdiri dari  '$ (".log").text ('Laporan sedang dijana. Sila  Tunggu');', mesej akan dipaparkan melalui koding '$(".log").show()' dan koding berikut AjaxCall(base_url+'index.php/laporan/generateReport_monthly', $var, 'generateReport_monthly' '', '$(".log").hide(); $("#generateReport_monthly").slideDown()',''); akan memaparkan laporan. '$ (".log").hide()' yang telah ditambah dalam koding AjaxCall menyebabkan tiada  paparan mesej 'Laporan sedang dijana. Sila Tunggu' setelah laporan sebenar dijana.


 


5) Seterusnya apabila button 'Cetak' diklik, paparan mesej 'Laporan sedang dijana. Sila Tunggu' sehingga dialog Print dipapar.


 


6) Berikut adalah kedudukan koding yang perlu diletakkan dalam button Cetak yang memegang id prnReport untuk paparan dialog print seperti yang dinyatakan diatas.
 


7) Seterusnya apabila button 'Excel' diklik, paparan mesej 'Laporan sedang dijana. Sila Tunggu'  kekal sehingga 'dialog Open With Microsoft Excel' dipaparkan.




8) Berikut adalah kedudukan koding yang perlu diletakkan dalam button Excel yang memegang id exlReport dimana mesej 'Laporan sedang dijana. Sila Tunggu' akan dipaparkan dan akan hilang dari skrin setelah tempoh yang ditetapkan tamat.




Disediakan oleh :- Nanthini A/P Chandiran
Sistem yang telah diaplikasikan :-  Health Integrated Data Application System
Sumber koding :-  Sistem epatuh

Apa itu Github?

Assalamualaikum dan salam sejahtera semua,

Saya nak kongsi  serba sedikit berkenaan Github. Diharap selepas ini anda semua boleh tahu serba sedikit tentang Github. ok Jom baca..

Apa itu Github? 

Github adalah software Hosting untuk projek open source yang menggunakan Tool System semakan kawalan Git. 
Jadi Git adalah tool untuk melakukan semakan code, manakala github adalah webhostingnya. 
Bahasa Mudah Github adalah Webhosting untuk projek-projek software seperti Google code atau sourceforge.net. 
Dalam bahasa biasa, Github adalah jaringan sosial untuk software developer.

Yang membezakan Github dari Project hosting yang lain boleh kita lihat di bawah ini :
1. Github menggunakan Git sebagai tool utama dalam mengkaji semula code.
2. Github menyediakan free hosting untuk projek open source, namun github juga menawarkan hosting berbayar untuk projek syarikat atau peribadi yang sifatnya persendirian.
3. Github disasarkan untuk para developer yang bekerja dalam pasukan dan tidak disatu tempat.
4. Github mempunyai ciri Social seperti Twitter seperti follow atau kegemaran (Star).
5. Github menyokong semua bahasa pengaturcaraan, anda bebas memakai bahasa dan tool yang biasa anda pakai.

Ciri-ciri social di github :
1. Github user profile.
2. Follow, Kita boleh memfollow profil programmer lain di github.
3. Star, fungsinya sama dengan Bookmark.
4. Watch, memantau repositori tertentu. Setiap ada perubahan di Repo, maka kita akan dihantar notifikasi
5. Fork, mengcopy keseluruhan code repository ke repo kita sendiri.

 Arahan: 

1. Klik URL https://github.com/join
2. Signup github seperti paparan dibawah.

3.ok selepas Signup , anda sudah boleh guna github :-) Semoga Berjaya...

----------------------------------------------------------
Disediakan Oleh : Zainimar Binti Zulkifli
Sumber :1.  https://github.com/join
Sumber :2.  http://www.candra.web.id/pengenalan-github-untuk-pemula/

Senarai Pendek Arahan PHP Artisan didalam Laravel 5

Assalamualaikum semua,

Harini saya nak kongsi senarai-senarai arahan pendek yang digunakan oleh PHP Artisan dalam Laravel 5 yang telah diajar oleh cikgu Arham Zulqarnaen pada bulan mei yang lepas.

Berikut adalah arahan php artisan yang biasa digunakan :

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// bring down the website - maintenance mode
php artisan down

// bring up the website (out of maintenance mdoe)
php artisan up

// migrate migrations to database
php artisan migrate

// seed database
php artisan db:seed

// seed specific table
php artisan db:seed --class=UserTableSeeder

// create migration (without model)
php artisan make:migration namaMigration
// eg: php artisan make:migration create_kakitangans_table

// create migration and directly point to specific table (handy when adding col)
php artisan make:migration --table=tableName migrationName
// eg: php artisan make:migration --table=users add_role_to_users

// create model and migration for that model
php artisan make:model ModelName
// eg: artisan make:model Kakitangan

// create controller
php artisan make:controller NamaController
// eg: php artisan make:controller KakitanganController

// create plain controller
php artisan make:controller --plain NamaController

// generate encryption key dalam .env
php artisan key:generate

// Revert to previous migration
php artisan migrate:rollback

// Reset the whole migration (full rollback)
php artisan migrate:reset

// reset database and migrate again
php artisan migrate:refresh

// + seed the database after refresh
php artisan migrate:refresh --seed

// checking list of artisan command
php artisan list

// getting help of particular artisan command (php artisan list)
php artisan help someArtisanCommand

// enter tinker mode
php artisan tinker

// change project's default name 
php artisan app:name myProjectName

// create middleware
php artisan make:middleware NamaMiddleware

// create request
php artisan make:request NamaRequest

// with Laracast Laravel-5-Generators-Extended
// https://github.com/laracasts/Laravel-5-Generators-Extended

// to create a complete migration schema from artisan command line
// refer github documentation for proper syntax
make:migration:schema

// to create a pivot table migration between 2 table
// example: tags and posts. A post could have many tags and 
// each tag could be used in many posts as well.
php artisan make:migration:pivot tags posts

// to create a seeder class using artisan command
php artisan make:seed posts

Ok enjoy ya. Sekian dulu.

----------------------------------------------------------
Disediakan Oleh : Zainimar Binti Zulkifli
Sumber : http://arhamzul.com/laravel-5-senarai-pendek-arahan-php-artisan/

MENGUBAH JENIS GRAF MENGGUNAKAN FUSIONCHARTS DI DALAM SESEBUAH APLIKASI SISTEM

GRAF FUSSION CHART

Pada umumnya untuk mendapatkan sesebuah laporan, adalah lebih mudah difahami jika disertakan dengan sebuah graf yang menarik. Rekabentuk graf / kategori graf yang dipilih mestilah bersesuaian dengan laporan yang ingin dipaparkan agar mudah difahami oleh pengguna.

Berikut adalah satu coding jenis graf yang telah dipilih.



Coding : 
         $graph_swfFile      = base_url().'assets/fscharts/MSColumn3D.swf'; 
         $graph_width        = 850 ;
         $graph_height       = 450 ;




PAPARAN PADA SISTEM



Download Fussionchart ke dalam server sistem development.



Maklumat jenis graf / filename boleh dirujuk melalui  url : http://www.fusioncharts.com/dev/




Disediakan oleh : Mariatulkibtiah binti Arshad
Rujukan : Sistem QAP (Penjagaan Kesihatan Premier)

Tuesday, 25 October 2016

Select Statement and Select Data from MYSQLi

Assalamualaikum, untuk post kali ni saya akan beri kod untuk `select data` menggunakan MYSQLi.

Simple dan Mudah.

<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "DB";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

$year = date('Y');
$sql = "SELECT tr_facsurvey_1.percentage, tr_facsurvey_1.id_facsurvey1
FROM tr_facsurvey_1
JOIN lt_facilities ON tr_facsurvey_1.facilitycode = lt_facilities.facilitycode AND lt_facilities.statusMO = 'Y' AND lt_facilities.progKkawanku = 'Y'
WHERE tr_facsurvey_1.percentage >= '80' AND YEAR(tr_facsurvey_1.dtkeyin) = '$year'";
$result = $conn->query($sql);

$total= $result->num_rows;

if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        $percent = number_format(($row["percentage"]/$total)*100,2);
        echo "percentage: " . $row["percentage"]. " percent - " . $percent."<br>";
    }
} else {
    echo "0 results";
}
$conn->close();
?>

Sekian, Terima Kasih. Diharap kod ini dapat membantu anda. Semoga Berjaya. 

Writer :
25/10/2016

Hello World: Build a mobile app in five minutes

http://www.adobe.com/devnet/flash-builder/articles/hello-world.html







Function Tambah Dan Papar Data Dalam ATK Framework

<?php

/***********************************************************************
    ATK Node: tpergerakan_gaji
    Table: tstspergerakangaji
    Date: 25/10/16

************************************************************************/       

useattrib("atkattribute");
useattrib("atkTextAttribute");
userelation("atkManyToOneRelation");

class tpergerakan_gaji extends atkNode{

        var $table = "tstspergerakangaji";
        var $primary_field = "";       
        var $node = "tpergerakan_gaji";
       
       
        // start constructor
        function tpergerakan_gaji(){
           
            // call constructor parent
            $this->atkNode($this->node,NF_ADD_LINK | NF_TRACK_CHANGES );
           
            $this->add(new atkAttribute("id", AF_AUTOKEY));
       
            $this->add(new atkManyToOneRelation("nokp","perkhidmatan.tpegawai",
            AF_FORCE_LOAD|AF_HIDE));
           
            $this->add(new atkManyToOneRelation("tahunnilai","nilaian.ttahunapc",
            AF_MANYTOONE_OBLIGATORY_NULL_ITEM|AF_SEARCHABLE|
            AF_FORCE_LOAD|AF_READONLY_EDIT),NULL,99);

            $this->add(new atkListAttribute("sts_cuti",array("PGB-Pergerakan Gaji Biasa", "PGI-Pergerakan
            Gaji Secara Isyarat", "TDPG-Tidak Diberikan Pergerakan Gaji"),
            array('PGB','PGI','TDPG'),AF_FORCE_LOAD));   
           
            $this->setOrder($this->order_field); // set order attribute(s)
            $this->setTable($this->table); // set node table

        }// end constructor

       function printMessage($message, $background_color='#6787B0', $text_color='white'){
       atkMessageQueue::addMessage("<div style='background-color: ".$background_color.";'><b>
       <font color='".$text_color."'>".$message."</font></b></div>"); //     FFAB35   }

           
       function descriptor_def(){
            return $this->descriptor_field;
       }
}// end node tpergerakan_gaji

?>


~ che wahida ~

How To Generate Reports In Excel In iReport


 Coding Untuk Button :




$path1=module_url("ireport/foldertest","test.php?p1={$variable1}&p2={$variable2}");
$url1='javascript:window.open("'.$path1.'","myreport");return false;';


 Coding Untuk File (test.php) :

include_once("../../mytools/excel/writer.php");
include_once("../../mytools/mytools.php");
include_once("../../../config.inc.php");
global $config_db;

/* Connecting, selecting database */
$link = mysql_connect($config_db["default"]["host"], $config_db["default"]["user"], $config_db["default"]["password"]) or die("Could not connect : " . mysql_error());
mysql_select_db($config_db["default"]["db"]) or die("Could not select database");

// Creating a workbook
$workbook = new Spreadsheet_Excel_Writer();

/* Sending HTTP headers, this will popup a file save/open
dialog in the browser when this file is run
*/
$workbook->send('test.xls');
$worksheet1 =& $workbook->addWorksheet('worksheet 1');

$header =& $workbook->addFormat();
$header->setBold();        // Make it bold
$header->setHAlign('center');    // Align text to center

$getvar1=$_GET['p1']; //variable 1
$getvar2=$_GET["p2"]; //variable 2

$strSQL="SELECT nokp, nama FROM tpegawai;"; // select field nokp and nama from table tpegawai
$record = doQuery($strSQL);

$worksheet1->write(0, 0, "TITLE",$header);
$worksheet1->mergeCells(0, 0, 0, 5);

$k=1;
#setheader

$setheader=array("BIL","NO.KAD PENGENALAN ","NAMA PEGAWAI"); // set column header

for ($j=0, $_j=count($setheader); $j<$_j;$j++){   
$worksheet1->write(3, $j, $setheader[$j], $header, $header2);
}

$bil=1;

#set size column
//function setColumn($firstcol, $lastcol, $width, $format = null, $hidden = 0, $level = 0)
$worksheet1->setColumn(1, 1, 14, null,0,0);
$worksheet1->setColumn(2, 5, 30, null,0,0);
$worksheet1->setColumn(9, 11, 30, null,0,0);
$worksheet1->setColumn(15, 15, 20, null,0,0);
$worksheet1->setColumn(16, 16, 20, null,0,0);

//set center pada kandungan
$worksheetformat =& $workbook->addFormat();
$worksheetformat->setHAlign('center');    // Align text to center
$worksheetformatleft =& $workbook->addFormat();
$worksheetformatleft->setHAlign('left');    // Align text to left

$i=0;
for ($i=0;$i<count($record);$i++){
   
    $setbil=$i+4;
    $worksheet1->write($setbil, 0, $i+1,$worksheetformat);
   
    if (strlen($record[$i]['nokp'])==12){
        $first=substr($record[$i]['nokp'],0,6);
        $second=substr($record[$i]['nokp'],6,2);
        $third=substr($record[$i]['nokp'],8,4);
        $nokp=$first."-".$second."-".$third;
    }else{
        $nokp=$record[$i]['nokp'];
    }
    $worksheet1->write($setbil, 1, $nokp,$worksheetleft);
    $worksheet1->write($setbil, 2, strtoupper($record[$i]['nama']),$worksheetformatleft);
}


function mysql_fetch_all($res) {
   while($row=mysql_fetch_array($res)) {
       $return[] = $row;
   }
   return $return;
}

function doQuery( $query, $res_key = NULL ){

$get_res = @mysql_query( $query ) or die(mysql_error());

if( $res = mysql_fetch_assoc( $get_res ) )
{
do{
if( $res_key !== NULL ){
$result[ $res[ $res_key ] ] = $res;
}else{
$result[] = $res;
};
}while( $res = mysql_fetch_assoc( $get_res ) );
}
else
{
$result = false;
};
return $result;
};

$workbook->close();
?>

~ che wahida ~

push-notifications use phonegap mobile apps

http://docs.phonegap.com/tutorials/develop/push-notifications/


 

MySQLi Connect

Assalamualaikum, untuk post kali ni saya akan beri kod untuk connect ke database menggunakan MYSQLi.

Simple dan Mudah.

<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "DB";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$conn->close();
?>

Sekian, Terima Kasih. Diharap kod ini dapat membantu anda memulakan koding. Semoga Berjaya. 

Writer :
25/10/2016

APLIKASI APP GENERATOR (APPGEN)


Pengenalan

Kerajaan telah menyediakan Aplikasi AppGenerator (APPGen) yang merupakan alat pembangun aplikasi dimana agensi-agensi kerajaan boleh membangunkan aplikasi mudah alih dengan sendiri tanpa melalui pihak ketiga Ini bertujuan membolehkan pakar IT membangunkan sesebuah applikasi dengan mudah dan dapat menjimatkan kos.


Terdapat 3 Mobile Platform :-
  1.  Google Play Google Play 
  2. iOS – App Store App Store 
  3. Windows – Windows Store

Contoh aplikasi yangtelah dibangunkan dan digunapakai umum : -


Architecture 1Gov Appstore















Maklumat secara power point boleh didapat melalui : http://www.moh.gov.my/mgpwa2015/Mesyuarat%20Teknikal%20ICT%202015/GAMMA.pdf
__________________________________________________________________________

Disediakan : Mariatulkibtiah binti Arshad

Monday, 24 October 2016

CodeIgniter Hacks for the Masters

CodeIgniter is a simple and powerful open source web application framework for PHP. Today, we'll do some core "hacks" to this framework to change and improve its functionality. In the process, you'll gain a better understanding of the intricacies of CodeIgniter.

  1. It is not recommended to apply these hacks to an existing project. Since they change some of CodeIgniter's core functionality, it can break the existing code.
  2. As of this writing, CodeIgniter 1.7.2 is the latest stable release. These hacks are not guaranteed to work for future (or past) releases.
  3. Even though CodeIgniter is designed to be PHP 4 compatible, some of these hacks are not. So you will need a server with PHP 5 installed.
  4. When you make any changes to the files inside the system folder, you should document it somewhere for future reference. Next time you upgrade CodeIgniter (even though they do not release updates very often), you may need to reapply those changes.












On the left side, you see the regular way of loading a model in CodeIgniter, from within a Controller. After this hack, we will be able to create objects directly. The code is cleaner, and your IDE will be able to recognize the object types. This enables IDE features such as auto-complete, or previewing documentation.

There are two more side effects of this hack. First, you are no longer required to extend the Model class:









And you no longer have to add a require_once call before you do model class inheritance.








All we need to do is add a PHP 5 style autoloader function.
Add this code to the bottom of system/application/config/config.php:

<?php
// ...
 
function __autoload($class) {
    if (file_exists(APPPATH."models/".strtolower($class).EXT)) {
        include_once(APPPATH."models/".strtolower($class).EXT);
    }
}
?>
 
If you are interested in applying this hack for controllers too, you can use this code instead:
 
<?php
// ...
 
function __autoload($class) {
    if (file_exists(APPPATH."models/".strtolower($class).EXT)) {
        include_once(APPPATH."models/".strtolower($class).EXT);
    } else if (file_exists(APPPATH."controllers/".strtolower($class).EXT)) {
        include_once(APPPATH."controllers/".strtolower($class).EXT);
    }
}
?>
 
Any time you try to use a class that is not defined, this __autoload function is called first. It takes care of loading the class file.

oleh : Mohd Khairol
Sumber Rujukan : https://code.tutsplus.com/tutorials/6-codeigniter-hacks-for-the-masters--net-8308

Using Highcharts with CodeIgniter








Step 1 – Pre-requisites
Download the CodeIgniter from http://ellislab.com/codeigniter and install on the app server.
Then you can download the source code and apply it on top of the installation. I did not include any CodeIgniter framework files.


Step 2 – CodeIgniter Configuration
Make a few configurations shown below and test and make sure you are getting CodeIgniter welcome screen.
1) Routing
/.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

2) Database Library
/application/config/autoload.php
‘database’ needs to be added to the libraries array

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'myuser';
$db['default']['password'] = '';
$db['default']['database'] = 'demo';

Step 3 – MySQL Table
We’ll use project_requests MySQL table. The script is included in the download file.












Step 4 – Model
We want our model to return all the rows from project_requests table.
You can use straight SQL but CodeIgniter’s Active Record functions are useful.
/application/model/data.php

<!--?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');</p-->

class Data extends CI_Model {

function __construct()
{
// Call the Model constructor
parent::__construct();
}

function get_data()
{
$this-&gt;db-&gt;select('month, wordpress, codeigniter, highcharts');
$this-&gt;db-&gt;from('project_requests');
$query = $this-&gt;db-&gt;get();
return $query-&gt;result();
}

}
Step 5 – Controller
This controller will support 2 URL’s here. Two URL’s will be represented by 2 controller methods

1) Method to show main HTML

public function index()
{
$this-&gt;load-&gt;view('chart');
}
2) Method to return JSON chart data
public function data()
{
$data = $this-&gt;data-&gt;get_data();

$category = array();
$category['name'] = 'Category';

$series1 = array();
$series1['name'] = 'WordPress';

$series2 = array();
$series2['name'] = 'Code Igniter';

$series3 = array();
$series3['name'] = 'Highcharts';

foreach ($data as $row)
{
$category['data'][] = $row-&gt;month;
$series1['data'][] = $row-&gt;wordpress;
$series2['data'][] = $row-&gt;codeigniter;
$series3['data'][] = $row-&gt;highcharts;
}

$result = array();
array_push($result,$category);
array_push($result,$series1);
array_push($result,$series2);
array_push($result,$series3);

print json_encode($result, JSON_NUMERIC_CHECK);
}
Full Controller Code:
/application/controller/chart.php

<!--?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');</p-->

class Chart extends CI_Controller {

public function __construct()
{
parent::__construct();
$this-&gt;load-&gt;model('data');
}

public function index()
{
$this-&gt;load-&gt;view('chart');
}

public function data()
{

$data = $this-&gt;data-&gt;get_data();

$category = array();
$category['name'] = 'Category';

$series1 = array();
$series1['name'] = 'WordPress';

$series2 = array();
$series2['name'] = 'Code Igniter';

$series3 = array();
$series3['name'] = 'Highcharts';

foreach ($data as $row)
{
$category['data'][] = $row-&gt;month;
$series1['data'][] = $row-&gt;wordpress;
$series2['data'][] = $row-&gt;codeigniter;
$series3['data'][] = $row-&gt;highcharts;
}

$result = array();
array_push($result,$category);
array_push($result,$series1);
array_push($result,$series2);
array_push($result,$series3);

print json_encode($result, JSON_NUMERIC_CHECK);
}

}

/* End of file chart.php */
/* Location: ./application/controllers/chart.php */
Notice that we need to load the model in the constructor
$this-&gt;load-&gt;model('data');
Step 6 – View
Finally, we need the JS code and HTML to display the chart.
Also, we need to call data method URL to load JSON to our chart.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">// <![CDATA[
        $(document).ready(function() {
            var options = {
                chart: {
                    renderTo: 'container',
                    type: 'line',
                    marginRight: 130,
                    marginBottom: 25
                },
                title: {
                    text: 'Project Requests',
                    x: -20 //center
                },
                subtitle: {
                    text: '',
                    x: -20
                },
                xAxis: {
                    categories: []
                },
                yAxis: {
                    title: {
                        text: 'Requests'
                    },
                    plotLines: [{
                        value: 0,
                        width: 1,
                        color: '#808080'
                    }]
                },
                tooltip: {
                    formatter: function() {
                            return '<b>'+ this.series.name +'</b>
'
+
                            this.x +': '+ this.y;
                    }
                },
                legend: {
                    layout: 'vertical',
                    align: 'right',
                    verticalAlign: 'top',
                    x: -10,
                    y: 100,
                    borderWidth: 0
                },

                series: []
            }

            $.getJSON("data", function(json) {
            options.xAxis.categories = json[0]['data'];
                options.series[0] = json[1];
                options.series[1] = json[2];
                options.series[2] = json[3];
                chart = new Highcharts.Chart(options);
            });
        });

// ]]></script>
<script type="text/javascript" src="http://code.highcharts.com/highcharts.js"></script>
<script type="text/javascript" src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto;"></div>
The way we call this is http://server-root/codeigniter-folder/chart/index.


oleh  : Mohd Khairol
Sumber Rujukan : http://blueflame-software.com/using-highcharts-with-codeigniter/