Skip to content
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

Closed
dtowell opened this issue Dec 28, 2016 · 8 comments
Closed

add chart color support #63

dtowell opened this issue Dec 28, 2016 · 8 comments

Comments

@dtowell
Copy link

dtowell commented Dec 28, 2016

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.

@CrazyBite
Copy link
Contributor

CrazyBite commented May 3, 2017

@PowerKiKi, hello. Can i help with my commit? https://github.com/CrazyBite/PhpSpreadsheet/commit/4732ed52771c9e4d650f5eed0de0bf304782f667
added fillColor.
try with \PhpSpreadsheet\samples\33_Chart_create_area.php
and change $dataSeriesLabels to:

$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
];

@PowerKiKi
Copy link
Member

PowerKiKi commented May 3, 2017

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?

@CrazyBite
Copy link
Contributor

CrazyBite commented May 4, 2017

#151 here. Ignore "condition" commit plz

@krzysztofruszczynski
Copy link
Contributor

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)

@PowerKiKi
Copy link
Member

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...

@stale
Copy link

stale bot commented Dec 12, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label Dec 12, 2017
@stale stale bot closed this as completed Dec 19, 2017
@arpit0515
Copy link

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
];

@oleibman
Copy link
Collaborator

Much support for Chart colors was added by PR #2898 (and subsequent) in June 2022.

@oleibman oleibman removed the stale label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants