CakePHP, Google Charts Plugin and JsHelper

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

CakePHP, Google Charts Plugin and JsHelper

Ana Mendes

i wish select an element of dropdownlist (choose a Project) and with JSHELPER (ajax) update the GRAPH that show statistics of this Project.

I can choose the Project and through the 'POST' I can generate the array graph, but i cannot show the GRAPH. I tested without JSHELPER and show my Graph.

MY VIEW CODE:

    <b>ESCOLHA O PROJETO: </b> 
    <?php
    echo $this->Form->select('projects', array($projects), array('multiple' => false,
        'class' => 'span2',
        'id' => 'projectsTest'));
    ?>
    </br>

     <div id="chart_div" > 

      </div>


<?php
$this->Js->get('#projectsTest')->event('change', $this->Js->request(array(
            'controller' => 'Registos',
            'action' => 'timePerProjectIssueTypeChart'
                ), array(
            'update' => '#chart_div',
            'async' => true,
            'method' => 'post',
            'dataExpression' => true,
            'data' => $this->Js->serializeForm(array(
                'isForm' => true,
                'inline' => true
            ))
)));

?> MY VIEW TIME_PER_PROJECT_ISSUE_TYPE_CHART

<div id="chart_div" > 
<?php

            echo $this->GoogleChart->createJsChart($timePerProjectIssueTypeChart);
            ?>

</div>

I do not put the code of the controllers, because individually tested and are working.

Thanks

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.