qax-os / excelize

Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets

Home Page:https://xuri.me/excelize

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different PieChart parts color and legend colors

kekovubicaprod opened this issue · comments

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

commented

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.

sry my bad