Closed rf1234 closed 5 years ago
+1 for this, i'm lookin for the same thing
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.
@rf1234 hi, you can actually set the chart fillcolor individually when you're defining plotLabel and plotValues as DataSeriesValues
$dataSeriesLabels = [
new PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues('String', 'Worksheet!$D$1), null, 1, [], null, '000000'),
new PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues('String', 'Worksheet!$E$1), null, 1, [], null, 'FFFFFF'),
];
$dataSeriesValues = [
new PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues('String', 'Worksheet!$D$5), null, 1, [], null, '000000'),
new PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues('String', 'Worksheet!$E$5), null, 1, [], null, 'FFFFFF'),
]
I never use the custom color feature till now for my work, but after read your question and decide to check the source code, and i found that we actually can set the color manually. I just tested to set the color manualy and it's works.
Hope it helps, unless what you want's passing and array of color schemes and passing as parameter when creating chart.
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.
Theme now has setThemeColor
and setThemeColorName
methods.
This is:
What is the expected behavior?
You should be able to use your own color scheme paticularly for charts.
What is the current behavior?
Currently only the standard Office color scheme is available making you charts look like everbody else's charts. The color scheme is hard coded.
What are the steps to reproduce?
Also here: I had to use a hard coded solution to get this fixed. I found the hex color scheme in file "Theme.php" and replaced it with my own.
Which versions of PhpSpreadsheet and PHP are affected?