summaryrefslogtreecommitdiff
path: root/chart.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2020-04-23 02:01:14 +0800
committerxuri <xuri.me@gmail.com>2020-04-23 02:01:14 +0800
commit1fe660df648422a53eef0c735657cb2f5237ef7b (patch)
tree6b1274e37fa6505b840eb1187bd42650908ca69b /chart.go
parent10115b5d889bb229d8707803b9413b20fe798588 (diff)
- Resolve #485 use sheet index instead of ID
- added 3 internal function: getSheetID, getActiveSheetID, getSheetNameByID
Diffstat (limited to 'chart.go')
-rw-r--r--chart.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/chart.go b/chart.go
index 2c802ee..8fa0b5d 100644
--- a/chart.go
+++ b/chart.go
@@ -762,7 +762,7 @@ func (f *File) AddChart(sheet, cell, format string, combo ...string) error {
// a chart.
func (f *File) AddChartSheet(sheet, format string, combo ...string) error {
// Check if the worksheet already exists
- if f.GetSheetIndex(sheet) != 0 {
+ if f.GetSheetIndex(sheet) != -1 {
return errors.New("the same name worksheet already exists")
}
formatSet, comboCharts, err := f.getFormatChart(format, combo)