-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scatter plotStyle not working #1431
Comments
Looking through the PhpSpreadsheet code and OpenXml docs everything looks fine on initial inspection. Writer / Xlsx / Chart.php Line 248 Setting $plotStyle to DataSeries::STYLE_MARKER set the parameter to "marker" which is the correct value in xml for c:scatterStyle. The XML produced likes fine also: |
Sorry to keep adding to my own issue. I opened the xlsx and changed the plotStyle to Marker only, Line Only, Line and Marker, Smooth Only, Smooth and Marker. I then saved each xlsx to a unique name and extracted the xlsx using 7-Zip. I then opened each xl/charts/chart1.xml file to review the differences. I am using the following Excels: I am not sure what versions of Excel that PhpSpreadsheet is compatible with. Here is what I found: PhpSpreadsheet CREATED - MARKER ONLY
XLSX SAVED - MARKER Only
XLSX SAVED - LINE Only
XLSX SAVED - LINE & MARKER
XLSX SAVED - SMOOTH Only
XLSX SAVED - SMOOTH & MARKER
Observations: Changes that I will attempt to make to PhpSpreadsheet are: The create a $plotStyle of MARKER ONLY the XML needs to include the following: |
So here is my final comment for attempting to show a Scatter Chart with a plot style of MARKER only.
If I can I will try to remember how to create a Pull Request to submit these changes. If any one can help tutor me I would appreciate it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Have you found a solution to the problem? It also seems that the colors of the lines are not taken into account. |
Is it possible to get this re-opened? It looks like this is still an issue -- using the sample code in the |
Hi @cwolcott , |
See #3428 (comment) The referenced sample performs: $dataSeriesValues[0]->getMarkerFillColor()
->setColorProperties('accent1', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME); |
Hi, someone know how add to DataSeriesValues range of separate cells? |
Addressed by, among others, PR #2828 in July 2022. |
This is:
What is the expected behavior?
The ScatterPlot chart is shown with MARKERS only instead of LINES & MARKERS.
What is the current behavior?
No matter what the plotStyle is the chart is always shown as LINES & MARKERS.
What are the steps to reproduce?
Use the current chart sample for Scatter 33_Chart_create_scatter.php. Of course change the Chart displayBlanksAs parameter from 0 to 'gap' since this is a known issue.
Change the DataSeries plotStyle parameter from DataSeries::STYLE_LINEMARKER to DataSeries::STYLE_MARKER.
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet 1.10.1
Php 7.4.2
Additional Comments
I am attempting to totally customizing the scatter chart and having several issues. The first step is described above, but next I have tried to setAxisOptionsProperties for the yAxis (min and max) and that doesn't seem to work either.
The text was updated successfully, but these errors were encountered: