-
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
add chart color support #63
Comments
@PowerKiKi, hello. Can i help with my commit? https://github.com/CrazyBite/PhpSpreadsheet/commit/4732ed52771c9e4d650f5eed0de0bf304782f667 $dataSeriesLabels = [
new \PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues('String', 'Worksheet!$B$1', null, 1, [], null, "C00000"), // 2010
new \PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues('String', 'Worksheet!$C$1', null, 1, [], null, "8064A2"), // 2011
new \PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues('String', 'Worksheet!$D$1', null, 1, [], null, "4BACC6"), // 2012
]; |
I had a quick glance and it seems to be a good start. But it should be rebased on develop, and a setter should probably be added. Can you create a PR for that? |
#151 here. Ignore "condition" commit plz |
Hello @PowerKiKi , if I read the code correctly, currently there is no support for customized color inside piechart, piechart_3d and donutchart (we need here different colors in one series of data; currently only one point is set with FF9900). Is there a plan to do it? (if yes, I can help with that issue) |
There is #158 that is on-going and should address, at least partially, color filling. I suppose you could help by reviewing it. Though it might it not be quite ready yet... |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I am looking for a similar support. I want to change the color of lines in trendline chart. The code mentioned by @PowerKiKi is not working for me. I have raised a separate issue. If this works for someone, please help me out. I will close the other issue. $dataSeriesLabels = [
new \PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues('String', 'Worksheet!$B$1', null, 1, [], null, "C00000"), // 2010
new \PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues('String', 'Worksheet!$C$1', null, 1, [], null, "8064A2"), // 2011
new \PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues('String', 'Worksheet!$D$1', null, 1, [], null, "4BACC6"), // 2012
]; |
Much support for Chart colors was added by PR #2898 (and subsequent) in June 2022. |
Add a way to set data series color (and other attributes) for various chart types (at minimum bar and line).
I am willing to pay for this addition.
The text was updated successfully, but these errors were encountered: