/** * Parses the parameters for the chart and sets them to the pChart object * * @param $args Array Associative array with arguments given by the user * @returns pChart pChart object with parameters set */ public function parseArgs($args, $default = false) { // Do all default parsing parent::parseArgs($args, $default); // Check whether the graph should be stacked if (array_key_exists("plots", $args)) { if ($args["plots"] == "open") { $this->chartArgs["plots"] = "open"; } else { $this->chartArgs["plots"] = "closed"; } } // Use the user-entered plotsize if (array_key_exists("plotsize", $args) && is_numeric($args["plotsize"])) { $this->chartArgs["plotsize"] = $args["plotsize"]; } // Use the cubic (smoothed) variant or the normal one if (array_key_exists("cubic", $args)) { if ($args["cubic"] != "false") { $this->chartArgs["cubic"] = true; } } // Use the cubic (smoothed) variant or the normal one if (array_key_exists("filled", $args)) { if ($args["filled"] != "false") { $this->chartArgs["filled"] = true; } } return $this->chartArgs; }
/** * Parses the parameters for the chart and sets them to the pChart object * * @param $args Array Associative array with arguments given by the user * @returns pChart pChart object with parameters set */ public function parseArgs($args, $default = false) { // Do all default parsing parent::parseArgs($args, $default); // Draw a filled radar graph instead of an empty one if (array_key_exists("filled", $args)) { if ($args["filled"] != "false") { $this->chartArgs["filled"] = true; } } // Draw stripes underneath the graph if (array_key_exists("striped", $args)) { if ($args["striped"] != "false") { $this->chartArgs["striped"] = true; } } // What color should be used for the graph background if (array_key_exists("stripecolor", $args)) { $this->chartArgs["stripecolor"] = wfPChart4mwhtml2rgb($args["stripecolor"]); } return $this->chartArgs; }
/** * Parses the parameters for the chart and sets them to the pChart object * * @param $args Array Associative array with arguments given by the user * @returns pChart pChart object with parameters set */ public function parseArgs($args, $default = false) { if (!$default) { $chartArgs = $this->getDefaultArgs(); } // Do all default parsing parent::parseArgs($args, $default); // Check whether the graph should be stacked if (array_key_exists("stacked", $args)) { if ($args["stacked"] != "false") { $this->chartArgs["stacked"] = true; } } // Check whether the graph should be overlay if (array_key_exists("overlay", $args)) { if ($args["overlay"] != "false") { $this->chartArgs["overlay"] = true; // Change default opacity to 50 $this->chartArgs["opacity"] = 50; } } return $this->chartArgs; }
/** * Parses the parameters for the chart and sets them to the pChart object * * @param $args Array Associative array with arguments given by the user * @returns pChart pChart object with parameters set */ public function parseArgs($args, $default = false) { // Do all default parsing parent::parseArgs($args, $default); // Check whether the graph should show plots if (array_key_exists("plots", $args)) { if ($args["plots"] == "open") { $this->chartArgs["plots"] = "open"; } elseif ($args["plots"] == "none") { $this->chartArgs["plots"] = "none"; } else { $this->chartArgs["plots"] = "closed"; } } // Check whether the points should be connected if (array_key_exists("connected", $args)) { if ($args["connected"] == "false") { $this->chartArgs["connected"] = false; } else { $this->chartArgs["connected"] = true; } } // Use the user-entered plotsize if (array_key_exists("plotsize", $args) && is_numeric($args["plotsize"])) { $this->chartArgs["plotsize"] = $args["plotsize"]; } return $this->chartArgs; }
/** * Parses the parameters for the chart and sets them to the pChart object * * @param $args Array Associative array with arguments given by the user * @returns pChart pChart object with parameters set */ public function parseArgs($args, $default = false) { // Do all default parsing parent::parseArgs($args, $default); if (array_key_exists("cross", $args)) { $this->chartArgs["cross"] = strtolower($args["cross"]) != "false"; } // Check whether the user have given the max plotsize or not if (array_key_exists("plotsize", $args)) { $this->chartArgs["plotmax"] = $args["plotsize"]; } else { $this->chartArgs["plotmax"] = 0; } return $this->chartArgs; }
/** * Parses the parameters for the chart and sets them to the pChart object * * @param $args Array Associative array with arguments given by the user * @returns pChart pChart object with parameters set */ public function parseArgs($args, $default = false) { // Do all default parsing parent::parseArgs($args, $default); // Check whether the percentages should be shown if (array_key_exists("percentages", $args)) { if ($args["percentages"] != "false") { $this->chartArgs["percentages"] = true; } else { $this->chartArgs["percentages"] = false; } } // Check whether the percentages should be shown if (array_key_exists("3d", $args)) { if ($args["3d"] != "false") { $this->chartArgs["3d"] = true; } else { $this->chartArgs["3d"] = false; } } // Check whether the percentages should be shown if (array_key_exists("exploded", $args)) { if ($args["exploded"] != "false") { $this->chartArgs["exploded"] = true; } else { $this->chartArgs["exploded"] = false; } } // The parameter 'labels' is used for X,Y graphs to compute // the size for the graph area. This is done in another way // with pie-charts, so we set the labels parameter to false // and compute the size and space another way. See also // pChart4mwPie::drawChartSpecific and pChart4mw::setGraphArea $this->chartArgs["pielabels"] = $this->chartArgs["labels"]; $this->chartArgs["labels"] = false; return $this->chartArgs; }