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

Different PieChart parts color and legend colors #1907

Closed
kekovubicaprod opened this issue May 27, 2024 · 2 comments
Closed

Different PieChart parts color and legend colors #1907

kekovubicaprod opened this issue May 27, 2024 · 2 comments

Comments

@kekovubicaprod
Copy link

Description
chart := &excelize.Chart{
Type: excelize.Pie,
Series: []excelize.ChartSeries{
{
Name: "Amount",
Categories: fmt.Sprintf("Sheet1!$%s$%s:$%s$%s", strings.Split(filledCategories[0], ":")[0], strings.Split(filledCategories[0], ":")[1], strings.Split(filledCategories[len(filledCategories)-1], ":")[0], strings.Split(filledCategories[len(filledCategories)-1], ":")[1]),
Values: fmt.Sprintf("Sheet1!$%s$%s:$%s$%s", strings.Split(filledCategories[0], ":")[0], strings.Split(filledValues[0], ":")[1], strings.Split(filledValues[len(filledValues)-1], ":")[0], strings.Split(filledValues[len(filledValues)-1], ":")[1]),
},
},

		Dimension: excelize.ChartDimension{
			Width:  200,
			Height: 300,
		},
		Legend: excelize.ChartLegend{
			Position:      "bottom",
			ShowLegendKey: false,
		},
		Title: []excelize.RichTextRun{
			{
				Font: nil,
				Text: value[headersDict["Цех"]].(string),
			},
		},
	
	}

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

image
image
image

Describe the results you expected:

Output of go version:

go version go1.22.3 linux/amd64

Excelize version or commit ID:

v2.8.1

Environment details (OS, Microsoft Excel™ version, physical, etc.):
ubuntu 22.04 libre office

@xuri
Copy link
Member

xuri commented May 28, 2024

Thanks for your issue. Could you show us a complete, standalone example program or reproducible demo? If you open an existing workbook, please provide the file attachment without confidential info.

@xuri xuri added the needs more info This issue can't reproduce, need more info label May 28, 2024
@kekovubicaprod
Copy link
Author

sry my bad

@xuri xuri removed the needs more info This issue can't reproduce, need more info label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants