mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-13 19:46:31 +00:00
Add point size option for scatter charts
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
|
||||
|
||||
### Added
|
||||
|
||||
- Nothing
|
||||
- Add point size option for scatter charts
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -4957,7 +4957,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int given\\.$#"
|
||||
count: 45
|
||||
count: 44
|
||||
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
|
||||
|
||||
-
|
||||
|
||||
@@ -45,6 +45,13 @@ class DataSeriesValues
|
||||
*/
|
||||
private $pointMarker;
|
||||
|
||||
/**
|
||||
* Series Point Size.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $pointSize = 3;
|
||||
|
||||
/**
|
||||
* Point Count (The number of datapoints in the dataseries).
|
||||
*
|
||||
@@ -175,6 +182,26 @@ class DataSeriesValues
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Point Size.
|
||||
*/
|
||||
public function getPointSize(): int
|
||||
{
|
||||
return $this->pointSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Point Size.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPointSize(int $size = 3)
|
||||
{
|
||||
$this->pointSize = $size;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Series Format Code.
|
||||
*
|
||||
|
||||
@@ -1140,7 +1140,7 @@ class Chart extends WriterPart
|
||||
|
||||
if ($plotSeriesMarker !== 'none') {
|
||||
$objWriter->startElement('c:size');
|
||||
$objWriter->writeAttribute('val', 3);
|
||||
$objWriter->writeAttribute('val', (string) $plotSeriesValues->getPointSize());
|
||||
$objWriter->endElement();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user