From 1787c3533b7ae5070001982b282cdeeab1b42e12 Mon Sep 17 00:00:00 2001 From: Eugene Dzhurinsky <jdevelop@gmail.com> Date: Wed, 9 May 2018 07:44:04 -0400 Subject: Use format string for chart dimension. Signed-off-by: Eugene Dzhurinsky <jdevelop@gmail.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index d49b2ba..ecba08b 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ func main() { for k, v := range values { xlsx.SetCellValue("Sheet1", k, v) } - xlsx.AddChart("Sheet1", "E1", `{"type":"col3DClustered","series":[{"name":"Sheet1!$A$2","categories":"Sheet1!$B$1:$D$1","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"}],"title":{"name":"Fruit 3D Clustered Column Chart"}}`,excelize.ChartWidth(800), excelize.ChartHeight(600)) + xlsx.AddChart("Sheet1", "E1", `{"type":"col3DClustered","dimension":{"width":640, "height":480},"series":[{"name":"Sheet1!$A$2","categories":"Sheet1!$B$1:$D$1","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"}],"title":{"name":"Fruit 3D Clustered Column Chart"}}`) // Save xlsx file by the given path. err := xlsx.SaveAs("./Book1.xlsx") if err != nil { -- cgit v1.2.1