[eluser]sheolikar[/eluser]
This folder structure of project.
V2recruiting
| |
assets V2rec
| |
application libraries
| |
libraries controller and views
|
graph
I m using open flash.
Here assets contain javascript and swf file.
libraries contain code for graph as suggested by previous thread.
Here is the coder for controller name statistics.
Code:
class Statistics extends Controller
{
function Statistics()
{
parent::Controller();
$this->load->helper(array('form'));
}
function index()
{
$this->load->library('session');
if($this->session->userdata('logged_in')==TRUE)
{
$this->load->library('graph');
$this->graph->title( 'Spoon sales '. date("Y"), '{font-size: 26px;}' );
srand((double)microtime()*1000000);
$max = 50;
$data = array();
for( $i=0; $i<12; $i++ )
{
$data[] = rand(0,$max);
}
$this->graph->set_data( $data );
$this->graph->line_hollow( 2, 4, '0x80a033', 'Spoon sales', 10 );
// label each point with its value
$this->graph->set_x_labels( array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' ) );
// set the Y max
$this->graph->set_y_max( 60 );
// label every 20 (0,20,40,60)
$this->graph->y_label_steps( 6 );
// display the data
echo $this->graph->render();
// echo $this->graph->render();
}
else
{
$this->load->helper(array('form', 'url'));
redirect('homepage');
}
}
}
main thing is it is not showing any thing. i had cleared error but after that everything is blank .i thing problem is with javascript and swf files.even done changes in graph.php as given down
$this->js_path = base_url().'assets/js/';
$this->swf_path = base_url().'assets/swf/';
main thing it is not showing any thing .help will be appreciated.