【发布时间】:2020-03-31 18:58:28
【问题描述】:
我想在我的 xlsx 电子表格中自定义 ScatterPlot 图表。我已使用 PhpSpreadsheet 的示例 ScatterPlot 代码开始。对示例代码的一项小修改是将新的 Chart displayBlanksAs 参数从 0 更改为“gap”。这是示例代码中的已知错误:
File containing a chart can not be opened by Excel 2003/2013/2019
我有很多问题,但我会问几个,然后也许我可以弄清楚其余的。
问题 #1: 如何将 ScatterPlot plotStyle 从 Line & Marker 更改为仅标记?我以为我可以将它从 DataSeries::STYLE_LINEMARKER 更改为 DataSeries::STYLE_MARKER。但这并没有改变什么。
$series = new DataSeries(
DataSeries::TYPE_SCATTERCHART,
null,
range(0, count($dataSeriesValues) - 1),
$dataSeriesLabels,
$xAxisTickValues,
$dataSeriesValues,
null,
null,
DataSeries::STYLE_LINEMARKER // Can I change to STYLE_MARKER?
);
问题 #2:。如何删除 yAxis 水平主网格线?
【问题讨论】:
-
我在 github 上的 PhpSpreadsheet 问题下进行了进一步调查和记录:github.com/PHPOffice/PhpSpreadsheet/issues/1431
标签: phpspreadsheet