public function toJavascript()
  {
    ob_start();
    ?>
    <script type="text/javascript">
      jQuery( function( $ )
      {
        "use strict";

        Morris.<?php echo $this->__chart_type ?>(
          <?php echo $this->toJSON() ?>
        );
      } );
    </script>
    <?php
    $buffer = ob_get_contents();
    ob_end_clean();

    return $buffer;
  }
public function toJavascript()
  {
    ob_start();
    ?>
    <script type="text/javascript">
      jQuery( function( $ )
      {
        "use strict";

        Morris.<?php echo $this->__chart_type ?>(
          <?php echo $this->toJSON() ?>
        );
      } );
    </script>
    <?php
    $buffer = ob_get_contents();
    ob_end_clean();

    return $buffer;
  }
public function toJavascript ( ) { ob_start ( ) ; ?>
    <script type="text/javascript">
      jQuery( function( $ )
      {
        "use strict";

        Morris.<?php echo $ this -> __chart_type ?>(
          <?php echo $ this -> toJSON ( ) ?>
        );
      } );
    </script>
    <?php $ buffer = ob_get_contents ( ) ; ob_end_clean ( ) ; return $ buffer ; }
Return the HTML markup for Javascript code

@brief Brief
@return string
Return the HTML markup for Javascript code