zingcharts

Does anyone have any experience with Zingcharts using Phalcon and MVC? Not certain about the best way to pass the json from the controller to the view. cheers.

Simply make a json string such as and set as variable.

CONTROLLER:

<?php

use Phalcon\Mvc\Controller;

class IndexController extends Controller
{

    public function indexAction()
    {

        $myArray = array('setting' => array('height' => 100 ... ) ... );
        $this->view->setVar('json',json_encode($myArray));

    }
}

VIEW:


<?php echo $json; ?>