summaryrefslogtreecommitdiff
path: root/chart.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-05-07 16:12:51 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2018-05-07 16:12:51 +0800
commit38ad20efc11c1872c4e62a12617f0300c138b867 (patch)
tree7190083ed4fa8ddaa1ec3b9ecb260423451f3164 /chart.go
parentbc451a78de32ccde2a4f6d0851ea6e41e45408f1 (diff)
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)
}