Boa tarde amigos,
Alguém já fez a integração com pCharts versão 2.0?
Minha imagem do gráfico está gerando quebrada.
Alguém sabe o que pode ser? Existe alguma forma de debugar os erros da biblioteca?
Também não sei se no Controller é o correto, se puderem me dar uma direção, agradeço.
Meu Controller:
public function actionView($id)
{
// Importa classes geradoras do gráfico
require_once('pChart/class/pData.class.php');
require_once('pChart/class/pDraw.class.php');
require_once('pChart/class/pImage.class.php');
/* Create your dataset object */
$myData = new pData();
/* Add data in your dataset */
$myData->addPoints(array(VOID,3,4,3,5));
/* Create a pChart object and associate your dataset */
$myPicture = new pImage(700,230,$myData);
/* Choose a nice font */
$myPicture->setFontProperties(array("FontName"=>dirname(__FILE__)."/../vendors/pChart/fonts/Forgotte.ttf","FontSize"=>11));
/* Define the boundaries of the graph area */
$myPicture->setGraphArea(60,40,670,190);
/* Draw the scale, keep everything automatic */
$myPicture->drawScale();
/* Draw the scale, keep everything automatic */
$myPicture->drawSplineChart();
/* Build the PNG file and send it to the web browser */
$diretorioGraficos = dirname(__FILE__)."/../../images/graficos/";
//$myPicture->Render("basic.png"); // Força o salvamento da imagem
//$myPicture->autoOutput();
$myPicture->Stroke(); //Apresenta na tela
$this->render('view');
}
Obrigado…