Created
October 13, 2014 15:51
-
-
Save evervasquez/9f3fa45f3bb8bff5ff18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Render chart's JavaScript code. | |
* | |
* @return string Generated JavaScript code. | |
*/ | |
public function renderJavaScript() { | |
$js = '$(function() {'; | |
$js .= sprintf( | |
'var chart = new Highcharts.%s(%s);', | |
($this->isHighstock) ? "StockChart" : 'Chart', | |
$this->options | |
); | |
$js .= '});'; | |
return $js; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment