-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Line chart has 6 lines at most in the WPS Office #627
Comments
package main
import (
"fmt"
"github.com/360EntSecGroup-Skylar/excelize"
)
var s string = `{
"type": "line",
"series": [{
"name": "Sheet1!$A$2",
"categories": "",
"values": "Sheet1!$B$2:$D$2"
}, {
"name": "Sheet1!$A$3",
"categories": "Sheet1!$B$1:$D$1",
"values": "Sheet1!$B$3:$D$3"
}, {
"name": "Sheet1!$A$4",
"categories": "Sheet1!$B$1:$D$1",
"values": "Sheet1!$B$4:$D$4"
}, {
"name": "Sheet1!$A$5",
"categories": "Sheet1!$B$1:$D$1",
"values": "Sheet1!$B$5:$D$5"
}, {
"name": "Sheet1!$A$6",
"categories": "Sheet1!$B$1:$D$1",
"values": "Sheet1!$B$6:$D$6"
}, {
"name": "Sheet1!$A$7",
"categories": "Sheet1!$B$1:$D$1",
"values": "Sheet1!$B$7:$D$7"
}, {
"name": "Sheet1!$A$8",
"categories": "Sheet1!$B$1:$D$1",
"values": "Sheet1!$B$8:$D$8"
}, {
"name": "Sheet1!$A$9",
"categories": "Sheet1!$B$1:$D$1",
"values": "Sheet1!$B$9:$D$9"
}],
"legend": {
"position": "top",
"show_legend_key": false
},
"title": {
"name": "Fruit Line Chart"
},
"plotarea": {
"show_bubble_size": true,
"show_cat_name": false,
"show_leader_lines": false,
"show_percent": true,
"show_series_name": true,
"show_val": true
},
"show_blanks_as": "zero",
"dimension":{
"height":1080,
"width":960
}
}`
func main() {
categories := map[string]string{
"A2": "Small", "A3": "Normal", "A4": "Large",
"A5": "A5", "A6": "A6", "A7": "A7",
"A8": "A8", "A9": "A9",
"B1": "Apple", "C1": "Orange", "D1": "Pear"}
values := map[string]int{
"B2": 2, "C2": 3, "D2": 3,
"B3": 5, "C3": 2, "D3": 4,
"B4": 6, "C4": 7, "D4": 8,
"B5": 9, "C5": 10, "D5": 11,
"B6": 12, "C6": 13, "D6": 14,
"B7": 15, "C7": 16, "D7": 17,
"B8": 18, "C8": 19, "D8": 20,
"B9": 21, "C9": 22, "D9": 23}
f := excelize.NewFile()
for k, v := range categories {
f.SetCellValue("Sheet1", k, v)
}
for k, v := range values {
f.SetCellValue("Sheet1", k, v)
}
if err := f.AddChart("Sheet1", "E1", s); err != nil {
fmt.Println(err)
}
// save
if err := f.SaveAs("./Book1.xlsx"); err != nil {
fmt.Println(err)
}
} |
Thanks for your feedback. I have tested on Microsoft® Excel 16.36, OpenOffice™ 4.1.7, Libre Office 6.3.3.2, and it works well. Maybe I need some time to investigate the issue that working in the Kingsoft WPS Office. |
xuri
changed the title
Line chart has 6 lines at most
Line chart has 6 lines at most in the WPS Office
May 5, 2020
EugeneAndrosovPaser
pushed a commit
to ceearrashee/excelize
that referenced
this issue
Nov 14, 2020
…ith KingSoft WPS - Avoid to create duplicate style - Update unit test for the auto filter - Init code scanning alerts
jenbonzhang
pushed a commit
to jenbonzhang/excelize
that referenced
this issue
Oct 22, 2023
…ith KingSoft WPS - Avoid to create duplicate style - Update unit test for the auto filter - Init code scanning alerts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Line chart has 6 lines at most
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Output of
go version
:go version go1.13.6
Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
go version go1.13.6 darwin/amd64
The text was updated successfully, but these errors were encountered: