Yii Framework Forum: Problem with Yiiopenflashchart - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem with Yiiopenflashchart Dynamic Chart Rate Topic: -----

#1 User is offline   ask1024 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 24-November 09

Posted 24 November 2009 - 10:01 AM

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
0

#2 User is offline   Asgaroth 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 371
  • Joined: 17-July 09
  • Location:Bogota, Colombia

Posted 27 November 2009 - 02:49 PM

View Postask1024, 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



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
0

#3 User is offline   Locke 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 08-December 09

Posted 12 February 2010 - 11:57 AM

Try something along the lines of this
<?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
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users