From 15ab5038fd529f6f30df94aea56770c06ce68075 Mon Sep 17 00:00:00 2001 From: THIVET Simon Date: Mon, 16 Oct 2023 15:05:27 +0200 Subject: [PATCH] Add function for multiple y axis graph --- inc/barchart.class.php | 162 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) diff --git a/inc/barchart.class.php b/inc/barchart.class.php index 64af8fc..f988d18 100644 --- a/inc/barchart.class.php +++ b/inc/barchart.class.php @@ -196,6 +196,168 @@ static function launchGraph($graph_datas = [], $graph_criterias = []) return $graph; } + /** + * @param array $graph_datas + * @param array $graph_criterias + * + * @return string + */ + static function launchMultipleYaxisGraph($graph_datas = [], $graph_criterias = []) + { + + $onclick = 0; + if (count($graph_criterias) > 0) + { + $onclick = 1; + } + $name = $graph_datas['name']; + $datas = $graph_datas['data']; + $ids = $graph_datas['ids']; + $label = $graph_datas['label'] ?? ""; + $labels = $graph_datas['labels']; + $title = $graph_datas['title'] ?? ""; + $comment = $graph_datas['comment'] ?? ""; + $url = $graph_criterias['url'] ?? PLUGIN_MYDASHBOARD_WEBDIR . "/ajax/launchURL.php"; + $legends = $graph_datas['legends'] ?? ""; + $yaxis = $graph_datas['yaxis']; + $json_criterias = json_encode($graph_criterias); + $theme = PluginMydashboardPreference::getPalette(Session::getLoginUserID()); + $graph = ""; + + return $graph; + } + /** * @param array $graph_datas