Skip to content

Commit

Permalink
Merge branch 'master' into 2.0 for rajivseelam fixes for issue #17
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhill committed Jan 1, 2015
2 parents aad47cd + 1477c01 commit e0bef38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Khill/Lavacharts/Charts/Chart.php
Expand Up @@ -296,7 +296,7 @@ public function events($e)

if (is_array($e)) {
foreach ($e as $event) {
if (is_subclass_of($event, 'Lavacharts\Events\Event')) {
if (is_subclass_of($event, 'Khill\Lavacharts\Events\Event')) {
$this->events[] = $event;
} else {
throw $this->invalidConfigValue(
Expand Down
5 changes: 3 additions & 2 deletions src/Khill/Lavacharts/JavascriptFactory.php
Expand Up @@ -181,12 +181,13 @@ private function buildChartJs()
$out .= $this->buildFormatters();
}

$out .= '$this.chart.draw($this.data, $this.options);'.PHP_EOL;

if ($this->chart->hasEvents()) {
$out .= $this->buildEventCallbacks();
}

$out .= '$this.chart.draw($this.data, $this.options);'.PHP_EOL;


$out .= "};".PHP_EOL.PHP_EOL;

switch ($this->chart->type) {
Expand Down

0 comments on commit e0bef38

Please sign in to comment.