phpchartjs pandora_enterprise#9554
This commit is contained in:
parent
872b079b20
commit
1dee676d5b
|
@ -551,11 +551,11 @@
|
|||
},
|
||||
{
|
||||
"name": "artica/phpchartjs",
|
||||
"version": "v1.0.1",
|
||||
"version": "v1.0.2",
|
||||
"dist": {
|
||||
"type": "path",
|
||||
"url": "../../../phpchartjs",
|
||||
"reference": "7ec8ed26f31671a6fc0c91c294b48dc9625d7827"
|
||||
"reference": "4957e7cd699e50cee8e0ba7304e1423aafb2cad2"
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
|
|
|
@ -2228,10 +2228,6 @@ function reporting_event_report_group(
|
|||
$options_charts = [
|
||||
'width' => 500,
|
||||
'height' => 150,
|
||||
'viewport' => [
|
||||
'width' => 500,
|
||||
'height' => 0,
|
||||
],
|
||||
'legend' => [
|
||||
'display' => true,
|
||||
'position' => 'right',
|
||||
|
@ -4375,10 +4371,6 @@ function reporting_event_report_agent(
|
|||
'width' => 500,
|
||||
'height' => 150,
|
||||
'radius' => null,
|
||||
'viewport' => [
|
||||
'width' => 500,
|
||||
'height' => 0,
|
||||
],
|
||||
'legend' => [
|
||||
'display' => true,
|
||||
'position' => 'right',
|
||||
|
@ -11073,10 +11065,6 @@ function reporting_get_module_detailed_event(
|
|||
'width' => 500,
|
||||
'height' => 150,
|
||||
'radius' => null,
|
||||
'viewport' => [
|
||||
'width' => 500,
|
||||
'height' => 0,
|
||||
],
|
||||
'legend' => [
|
||||
'display' => true,
|
||||
'position' => 'right',
|
||||
|
|
|
@ -693,10 +693,10 @@ function get_build_setup_charts($type, $options, $data)
|
|||
$legend->setAlign($legendAlign);
|
||||
|
||||
// Defaults fonts legends.
|
||||
// $legend->labels()->getFonts()->setFamily((empty($config['fontpath']) === true) ? 'Lato' : $config['fontpath']);
|
||||
// $legend->labels()->getFonts()->setStyle('normal');
|
||||
// $legend->labels()->getFonts()->setWeight(600);
|
||||
// $legend->labels()->getFonts()->setSize(((int) $config['font_size'] + 2));
|
||||
$legend->labels()->getFonts()->setFamily((empty($config['fontpath']) === true) ? 'Lato' : $config['fontpath']);
|
||||
$legend->labels()->getFonts()->setStyle('normal');
|
||||
$legend->labels()->getFonts()->setWeight(600);
|
||||
$legend->labels()->getFonts()->setSize(((int) $config['font_size'] + 2));
|
||||
if (isset($options['legend']['fonts']) === true
|
||||
&& empty($options['legend']['fonts']) === false
|
||||
&& is_array($options['legend']['fonts']) === true
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"readme": "README.md",
|
||||
"homepage": "https://artica.es/",
|
||||
"type": "package",
|
||||
"version": "v1.0.1",
|
||||
"version": "v1.0.2",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"authors": [
|
||||
{
|
||||
|
|
|
@ -4,7 +4,8 @@ namespace Artica\PHPChartJS\Options;
|
|||
|
||||
use Artica\PHPChartJS\ArraySerializableInterface;
|
||||
use Artica\PHPChartJS\Delegate\ArraySerializable;
|
||||
use Artica\PHPChartJS\LabelsCollection;
|
||||
use Artica\PHPChartJS\Labels;
|
||||
use Artica\PHPChartJS\Options\Legend\Labels as LegendLabels;
|
||||
use JsonSerializable;
|
||||
use Laminas\Json\Expr;
|
||||
|
||||
|
@ -43,7 +44,7 @@ class Legend implements ArraySerializableInterface, JsonSerializable
|
|||
private $onHover;
|
||||
|
||||
/**
|
||||
* @var LabelsCollection
|
||||
* @var Labels
|
||||
*/
|
||||
private $labels;
|
||||
|
||||
|
@ -171,12 +172,12 @@ class Legend implements ArraySerializableInterface, JsonSerializable
|
|||
|
||||
|
||||
/**
|
||||
* @return LabelsCollection
|
||||
* @return Labels
|
||||
*/
|
||||
public function labels()
|
||||
{
|
||||
if (is_null($this->labels)) {
|
||||
$this->labels = new LabelsCollection();
|
||||
$this->labels = new LegendLabels();
|
||||
}
|
||||
|
||||
return $this->labels;
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace Artica\PHPChartJS\Options\Legend;
|
|||
|
||||
use Artica\PHPChartJS\ArraySerializableInterface;
|
||||
use Artica\PHPChartJS\Delegate\ArraySerializable;
|
||||
use Artica\PHPChartJS\Options\Fonts;
|
||||
use JsonSerializable;
|
||||
use Laminas\Json\Expr;
|
||||
|
||||
|
@ -17,32 +18,17 @@ class Labels implements ArraySerializableInterface, JsonSerializable
|
|||
use ArraySerializable;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var integer
|
||||
*/
|
||||
private $boxWidth;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var Fonts
|
||||
*/
|
||||
private $fontSize;
|
||||
private $font;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $fontStyle;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $fontColor;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $fontFamily;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var integer
|
||||
*/
|
||||
private $padding;
|
||||
|
||||
|
@ -52,20 +38,22 @@ class Labels implements ArraySerializableInterface, JsonSerializable
|
|||
private $generateLabels;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
* @var boolean
|
||||
*/
|
||||
private $usePointStyle;
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @return integer
|
||||
*/
|
||||
public function getBoxWidth()
|
||||
{
|
||||
return $this->boxWidth;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $boxWidth
|
||||
* @param integer $boxWidth
|
||||
*
|
||||
* @return Labels
|
||||
*/
|
||||
|
@ -76,96 +64,33 @@ class Labels implements ArraySerializableInterface, JsonSerializable
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFontSize()
|
||||
{
|
||||
return $this->fontSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $fontSize
|
||||
* Return Font.
|
||||
*
|
||||
* @return Labels
|
||||
* @return Font
|
||||
*/
|
||||
public function setFontSize($fontSize)
|
||||
public function getFonts()
|
||||
{
|
||||
$this->fontSize = intval($fontSize);
|
||||
|
||||
return $this;
|
||||
if (isset($this->font) === false) {
|
||||
$this->font = new Fonts();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFontStyle()
|
||||
{
|
||||
return $this->fontStyle;
|
||||
return $this->font;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fontStyle
|
||||
*
|
||||
* @return Labels
|
||||
*/
|
||||
public function setFontStyle($fontStyle)
|
||||
{
|
||||
$this->fontStyle = strval($fontStyle);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFontColor()
|
||||
{
|
||||
return $this->fontColor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fontColor
|
||||
*
|
||||
* @return Labels
|
||||
*/
|
||||
public function setFontColor($fontColor)
|
||||
{
|
||||
$this->fontColor = strval($fontColor);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFontFamily()
|
||||
{
|
||||
return $this->fontFamily;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fontFamily
|
||||
*
|
||||
* @return Labels
|
||||
*/
|
||||
public function setFontFamily($fontFamily)
|
||||
{
|
||||
$this->fontFamily = strval($fontFamily);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @return integer
|
||||
*/
|
||||
public function getPadding()
|
||||
{
|
||||
return $this->padding;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $padding
|
||||
* @param integer $padding
|
||||
*
|
||||
* @return Labels
|
||||
*/
|
||||
|
@ -176,6 +101,7 @@ class Labels implements ArraySerializableInterface, JsonSerializable
|
|||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Expr
|
||||
*/
|
||||
|
@ -184,6 +110,7 @@ class Labels implements ArraySerializableInterface, JsonSerializable
|
|||
return $this->generateLabels;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $generateLabels
|
||||
*
|
||||
|
@ -196,16 +123,18 @@ class Labels implements ArraySerializableInterface, JsonSerializable
|
|||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function isUsePointStyle()
|
||||
{
|
||||
return $this->usePointStyle;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param bool $usePointStyle
|
||||
* @param boolean $usePointStyle
|
||||
*
|
||||
* @return Labels
|
||||
*/
|
||||
|
@ -216,6 +145,7 @@ class Labels implements ArraySerializableInterface, JsonSerializable
|
|||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
@ -223,4 +153,6 @@ class Labels implements ArraySerializableInterface, JsonSerializable
|
|||
{
|
||||
return $this->getArrayCopy();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -569,12 +569,12 @@
|
|||
},
|
||||
{
|
||||
"name": "artica/phpchartjs",
|
||||
"version": "v1.0.1",
|
||||
"version_normalized": "1.0.1.0",
|
||||
"version": "v1.0.2",
|
||||
"version_normalized": "1.0.2.0",
|
||||
"dist": {
|
||||
"type": "path",
|
||||
"url": "../../../phpchartjs",
|
||||
"reference": "7ec8ed26f31671a6fc0c91c294b48dc9625d7827"
|
||||
"reference": "4957e7cd699e50cee8e0ba7304e1423aafb2cad2"
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
'name' => 'pandorafms/console',
|
||||
'pretty_version' => 'dev-develop',
|
||||
'version' => 'dev-develop',
|
||||
'reference' => '2e48d517141e494775e9b22166f37eb589e06baa',
|
||||
'reference' => '872b079b20910f3fa403f418df510e134db9f463',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
@ -83,9 +83,9 @@
|
|||
'dev_requirement' => false,
|
||||
),
|
||||
'artica/phpchartjs' => array(
|
||||
'pretty_version' => 'v1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'reference' => '7ec8ed26f31671a6fc0c91c294b48dc9625d7827',
|
||||
'pretty_version' => 'v1.0.2',
|
||||
'version' => '1.0.2.0',
|
||||
'reference' => '4957e7cd699e50cee8e0ba7304e1423aafb2cad2',
|
||||
'type' => 'package',
|
||||
'install_path' => __DIR__ . '/../artica/phpchartjs',
|
||||
'aliases' => array(),
|
||||
|
@ -193,7 +193,7 @@
|
|||
'pandorafms/console' => array(
|
||||
'pretty_version' => 'dev-develop',
|
||||
'version' => 'dev-develop',
|
||||
'reference' => '2e48d517141e494775e9b22166f37eb589e06baa',
|
||||
'reference' => '872b079b20910f3fa403f418df510e134db9f463',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
|
Loading…
Reference in New Issue