We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Fill
Description
Hi, Maintainers
How can I set the Fill color for each part of pie chart ?
Like:
for idx, row := range [][]interface{}{ {"Apple", "Orange", "Pear"}, {2, 3, 3}, } { cell, err := excelize.CoordinatesToCellName(1, idx+1) if err != nil { fmt.Println(err) return } if err := f.SetSheetRow("Sheet1", cell, &row); err != nil { fmt.Println(err) return } } if err := f.AddChart("Sheet1", "E1", &excelize.Chart{ Type: excelize.Pie, Series: []excelize.ChartSeries{ { Name: "Amount", Categories: "Sheet1!$A$1:$C$1", Values: "Sheet1!$A$2:$C$2", }, }, Title: []excelize.RichTextRun{ { Text: "Fruit Pie Chart", }, }, }); err != nil { fmt.Println(err) return }
I'm wondering about how to set colors for Apple, Orange and Pear
Apple
Orange
Pear
Thanks.
Steps to reproduce the issue:
Describe the results you received:
Each series fill color can only be set by:
excelize.ChartSeries{ Fill: excelize.Fill{ Type: "pattern", Color: []string{"#505050"}, Pattern: 1, }, }
Describe the results you expected:
Output of go version:
go version
v1.22
Excelize version or commit ID:
2.8.1
Environment details (OS, Microsoft Excel™ version, physical, etc.):
The text was updated successfully, but these errors were encountered:
Duplicated with #1862.
Sorry, something went wrong.
I closed this issue, and keep #1862 to track this feature request, if you have any questions, please let me know to reopen this anytime.
No branches or pull requests
Description
Hi, Maintainers
How can I set the
Fill
color for each part of pie chart ?Like:
I'm wondering about how to set colors for
Apple
,Orange
andPear
Thanks.
Steps to reproduce the issue:
Describe the results you received:
Each series fill color can only be set by:
Describe the results you expected:
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
The text was updated successfully, but these errors were encountered: