Skip to content

Commit

Permalink
Recursively check for pointLabel option
Browse files Browse the repository at this point in the history
  • Loading branch information
amelkikh committed Aug 11, 2016
1 parent c6a67eb commit 5d5af26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions JqPlot.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ public function registerRenderersRecursively($data)
foreach ($data as $k => $v) {
if ($k == 'renderer' || $k == 'tickRenderer') {
$this->registerRendererJsFile($v);
} elseif ($k == 'pointLabels' && isset($v['show']) && (boolean)$v['show']) {
Yii::$app->assetManager->bundles[JqPlotAsset::className()]->js[] = 'plugins/jqplot.pointLabels.js';
} elseif (is_array($v)) {
$this->registerRenderersRecursively($v);
}
Expand Down Expand Up @@ -150,7 +152,5 @@ public function registerRendererJsFile($renderer)
if (!in_array($url, Yii::$app->assetManager->bundles[JqPlotAsset::className()]->js)) {
Yii::$app->assetManager->bundles[JqPlotAsset::className()]->js[] = $url;
}

Yii::$app->assetManager->bundles[JqPlotAsset::className()]->js[] = 'plugins/jqplot.pointLabels.js';
}
}

0 comments on commit 5d5af26

Please sign in to comment.