summaryrefslogtreecommitdiff
path: root/chart.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2018-05-07 16:44:02 +0800
committerGitHub <noreply@github.com>2018-05-07 16:44:02 +0800
commit038e34250f3ff827d85434b65cbba86a95724318 (patch)
treea4c441c4e2b7f3cdb3d34dcc80ae8e2011736b3b /chart.go
parent3ca180f09c4a602068d890bd22e83ac48a83f5cf (diff)
parentd04be7b33da84a3f2f768ee4f0de7c49ab69279e (diff)
Merge pull request #220 from lunny/lunny/refactor
save bytes on memory instead of string
Diffstat (limited to 'chart.go')
-rw-r--r--chart.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/chart.go b/chart.go
index 6168553..c71dd9f 100644
--- a/chart.go
+++ b/chart.go
@@ -549,7 +549,7 @@ func (f *File) addChart(formatSet *formatChart) {
chart, _ := xml.Marshal(xlsxChartSpace)
media := "xl/charts/chart" + strconv.Itoa(count+1) + ".xml"
- f.saveFileList(media, string(chart))
+ f.saveFileList(media, chart)
}
// drawBaseChart provides function to draw the c:plotArea element for bar,
@@ -1151,5 +1151,5 @@ func (f *File) addDrawingChart(sheet, drawingXML, cell string, width, height, rI
}
content.TwoCellAnchor = append(content.TwoCellAnchor, &twoCellAnchor)
output, _ := xml.Marshal(content)
- f.saveFileList(drawingXML, string(output))
+ f.saveFileList(drawingXML, output)
}