Hi
I am newbie to yii framework.I am doing dynamic chart using open flash chart.I download yiiopenflashchart and configure to my server.The broblem is the chart always find the data file from var/www/html/data-files/area-point-objects.txt.
In my view file
My code like this
$flashChart = Yii::createComponent('application.extensions.yiiopenflashchart.EOFC2');
$flashChart->begin('SteppChart');
$flashChart->render(500, 400);
I want to genarate data from my postgres database.
Please guide me.
Thanks in advance.
Regards
Ask1024
Page 1 of 1
Problem with Yiiopenflashchart Dynamic Chart
#2
Posted 27 November 2009 - 02:49 PM
ask1024, on 24 November 2009 - 10:01 AM, said:
Hi
I am newbie to yii framework.I am doing dynamic chart using open flash chart.I download yiiopenflashchart and configure to my server.The broblem is the chart always find the data file from var/www/html/data-files/area-point-objects.txt.
In my view file
My code like this
$flashChart = Yii::createComponent('application.extensions.yiiopenflashchart.EOFC2');
$flashChart->begin('SteppChart');
$flashChart->render(500, 400);
I want to genarate data from my postgres database.
Please guide me.
Thanks in advance.
Regards
Ask1024
I am newbie to yii framework.I am doing dynamic chart using open flash chart.I download yiiopenflashchart and configure to my server.The broblem is the chart always find the data file from var/www/html/data-files/area-point-objects.txt.
In my view file
My code like this
$flashChart = Yii::createComponent('application.extensions.yiiopenflashchart.EOFC2');
$flashChart->begin('SteppChart');
$flashChart->render(500, 400);
I want to genarate data from my postgres database.
Please guide me.
Thanks in advance.
Regards
Ask1024
The problem is you are not telling the chart what data to use (with ->setData) , read the documentation on how to do so on the extension page.
Alex,
- Extension: Dynamic DataProvider Behavior
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.
- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.
- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing
#3
Posted 12 February 2010 - 11:57 AM
Try something along the lines of this
for more examples look at the developer's website examples .
the syntax doesn't differ that much from the original
<?php
$flashChart = Yii::createComponent('application.extensions.openflashchart2.EOFC2');
$flashChart->begin();
$flashChart->setTitle('Sample Chart');
$flashChart->axis('y',array('range' => array(0, 100, 10)));
$flashChart->setStackColours(array('#0000ff','#ff0000','#00FF00'));
$flashChart->setData(array(
array(80,10,10),
array(60,20,20),
array(40,30,30),
array(20,40,40),
));
$flashChart->renderData('bar_stack');
//$flashChart->render(300,300);
$flashChart->setData(array(50,30,2,4),'{n}',false,'stuff','chart2');
$flashChart->renderData('line',array(),'stuff','chart2');
$flashChart->render(400,400,'chart2','chartDomId');
echo '<div id="chartDomId"></div>';for more examples look at the developer's website examples .
the syntax doesn't differ that much from the original
Share this topic:
Page 1 of 1

Help












