mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
#11326 fixed dark theme in security hardening
This commit is contained in:
parent
62a70dee2c
commit
a3d5bd80f9
@ -1108,6 +1108,22 @@ function get_build_setup_charts($type, $options, $data)
|
|||||||
&& empty($options['scales']['r']['pointLabels']) === false
|
&& empty($options['scales']['r']['pointLabels']) === false
|
||||||
&& is_array($options['scales']['r']['pointLabels']) === true
|
&& is_array($options['scales']['r']['pointLabels']) === true
|
||||||
) {
|
) {
|
||||||
|
if (isset($options['scales']['r']['pointLabels']['color']) === true) {
|
||||||
|
$scales->getR()->pointLabels()->setColor($options['scales']['r']['pointLabels']['color']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($options['scales']['r']['grid']['display']) === true) {
|
||||||
|
$scales->getR()->grid()->setDrawOnChartArea($options['scales']['r']['grid']['display']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($options['scales']['r']['grid']['color']) === true) {
|
||||||
|
$scales->getR()->grid()->setColor($options['scales']['r']['grid']['color']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($options['scales']['r']['angleLines']['color']) === true) {
|
||||||
|
$scales->getR()->angleLines()->setColor($options['scales']['r']['angleLines']['color']);
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($options['scales']['r']['pointLabels']['fonts']) === true
|
if (isset($options['scales']['r']['pointLabels']['fonts']) === true
|
||||||
&& empty($options['scales']['r']['pointLabels']['fonts']) === false
|
&& empty($options['scales']['r']['pointLabels']['fonts']) === false
|
||||||
&& is_array($options['scales']['r']['pointLabels']['fonts']) === true
|
&& is_array($options['scales']['r']['pointLabels']['fonts']) === true
|
||||||
|
@ -4,6 +4,7 @@ namespace Artica\PHPChartJS\Options;
|
|||||||
|
|
||||||
use Artica\PHPChartJS\ArraySerializableInterface;
|
use Artica\PHPChartJS\ArraySerializableInterface;
|
||||||
use Artica\PHPChartJS\Delegate\ArraySerializable;
|
use Artica\PHPChartJS\Delegate\ArraySerializable;
|
||||||
|
use Artica\PHPChartJS\Options\Scales\AngleLines;
|
||||||
use Artica\PHPChartJS\Options\Scales\GridLines;
|
use Artica\PHPChartJS\Options\Scales\GridLines;
|
||||||
use Artica\PHPChartJS\Options\Scales\PointLabels;
|
use Artica\PHPChartJS\Options\Scales\PointLabels;
|
||||||
use Artica\PHPChartJS\Options\Scales\ScaleLabel;
|
use Artica\PHPChartJS\Options\Scales\ScaleLabel;
|
||||||
@ -129,6 +130,13 @@ abstract class Scale implements ArraySerializableInterface, JsonSerializable
|
|||||||
*/
|
*/
|
||||||
protected $grid;
|
protected $grid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AngleLines
|
||||||
|
*
|
||||||
|
* @var AngleLines
|
||||||
|
*/
|
||||||
|
protected $angleLines;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ScaleLabel
|
* @var ScaleLabel
|
||||||
*/
|
*/
|
||||||
@ -164,7 +172,7 @@ abstract class Scale implements ArraySerializableInterface, JsonSerializable
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -585,6 +593,26 @@ abstract class Scale implements ArraySerializableInterface, JsonSerializable
|
|||||||
return $this->grid;
|
return $this->grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return AngleLines
|
||||||
|
*/
|
||||||
|
public function getAngleLines()
|
||||||
|
{
|
||||||
|
return $this->angleLines;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return AngleLines
|
||||||
|
*/
|
||||||
|
public function angleLines()
|
||||||
|
{
|
||||||
|
if (is_null($this->angleLines)) {
|
||||||
|
$this->angleLines = new AngleLines();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->angleLines;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return ScaleLabel
|
* @return ScaleLabel
|
||||||
*/
|
*/
|
||||||
|
135
pandora_console/vendor/artica/phpchartjs/src/Options/Scales/AngleLines.php
vendored
Normal file
135
pandora_console/vendor/artica/phpchartjs/src/Options/Scales/AngleLines.php
vendored
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Artica\PHPChartJS\Options\Scales;
|
||||||
|
|
||||||
|
use Artica\PHPChartJS\ArraySerializableInterface;
|
||||||
|
use Artica\PHPChartJS\Delegate\ArraySerializable;
|
||||||
|
use Artica\PHPChartJS\Delegate\NumberUtils;
|
||||||
|
use Artica\PHPChartJS\Delegate\StringUtils;
|
||||||
|
use JsonSerializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class AngleLines
|
||||||
|
*
|
||||||
|
* @package Artica\PHPChartJS\Options\Scales
|
||||||
|
*/
|
||||||
|
class AngleLines implements ArraySerializableInterface, JsonSerializable
|
||||||
|
{
|
||||||
|
use ArraySerializable;
|
||||||
|
use StringUtils;
|
||||||
|
use NumberUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $display;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string|string[]
|
||||||
|
*/
|
||||||
|
private $color;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var float[]|null
|
||||||
|
*/
|
||||||
|
private $borderDash;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var float
|
||||||
|
*/
|
||||||
|
private $borderDashOffset;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isDisplay()
|
||||||
|
{
|
||||||
|
return $this->display;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $display
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setDisplay($display)
|
||||||
|
{
|
||||||
|
$this->display = $display;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string|string[]
|
||||||
|
*/
|
||||||
|
public function getColor()
|
||||||
|
{
|
||||||
|
return $this->color;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string|string[] $color
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setColor($color)
|
||||||
|
{
|
||||||
|
if (is_array($color)) {
|
||||||
|
$this->color = $this->recursiveToString($color);
|
||||||
|
} else {
|
||||||
|
$this->color = is_null($color) ? null : strval($color);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return float[]|null
|
||||||
|
*/
|
||||||
|
public function getBorderDash()
|
||||||
|
{
|
||||||
|
return $this->borderDash;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param float[] $borderDash
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setBorderDash($borderDash)
|
||||||
|
{
|
||||||
|
if (is_array($borderDash)) {
|
||||||
|
$this->borderDash = $this->recursiveToFloat($borderDash);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
public function getBorderDashOffset()
|
||||||
|
{
|
||||||
|
return $this->borderDashOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param float $borderDashOffset
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setBorderDashOffset($borderDashOffset)
|
||||||
|
{
|
||||||
|
$this->borderDashOffset = floatval($borderDashOffset);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function jsonSerialize()
|
||||||
|
{
|
||||||
|
return $this->getArrayCopy();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user