diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-09-30 17:07:59 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-09-30 17:07:59 +0800 |
commit | 905be463edc6d9b0ed184bdee0116217a5118c5e (patch) | |
tree | b5e1869ad992ed2fc7e3e4e56b8178b0473dcb88 /chart.go | |
parent | d4df70bd9fa671d20a5e000d20e621ca69451274 (diff) |
Improve code readability.
Diffstat (limited to 'chart.go')
-rw-r--r-- | chart.go | 53 |
1 files changed, 46 insertions, 7 deletions
@@ -21,11 +21,52 @@ const ( // This section defines the default value of chart properties. var ( - chartView3DRotX = map[string]int{Bar: 0, Bar3D: 15, Doughnut: 0, Line: 0, Pie: 0, Pie3D: 30, Radar: 0, Scatter: 0} - chartView3DRotY = map[string]int{Bar: 0, Bar3D: 20, Doughnut: 0, Line: 0, Pie: 0, Pie3D: 0, Radar: 0, Scatter: 0} - chartView3DDepthPercent = map[string]int{Bar: 100, Bar3D: 100, Doughnut: 100, Line: 100, Pie: 100, Pie3D: 100, Radar: 100, Scatter: 100} - chartView3DRAngAx = map[string]int{Bar: 0, Bar3D: 1, Doughnut: 0, Line: 0, Pie: 0, Pie3D: 0, Radar: 0, Scatter: 0} - chartLegendPosition = map[string]string{"bottom": "b", "left": "l", "right": "r", "top": "t", "top_right": "tr"} + chartView3DRotX = map[string]int{ + Bar: 0, + Bar3D: 15, + Doughnut: 0, + Line: 0, + Pie: 0, + Pie3D: 30, + Radar: 0, + Scatter: 0, + } + chartView3DRotY = map[string]int{ + Bar: 0, + Bar3D: 20, + Doughnut: 0, + Line: 0, + Pie: 0, + Pie3D: 0, + Radar: 0, + Scatter: 0, + } + chartView3DDepthPercent = map[string]int{ + Bar: 100, + Bar3D: 100, + Doughnut: 100, + Line: 100, + Pie: 100, + Pie3D: 100, + Radar: 100, + Scatter: 100, + } + chartView3DRAngAx = map[string]int{ + Bar: 0, + Bar3D: 1, + Doughnut: 0, + Line: 0, + Pie: 0, + Pie3D: 0, + Radar: 0, + Scatter: 0} + chartLegendPosition = map[string]string{ + "bottom": "b", + "left": "l", + "right": "r", + "top": "t", + "top_right": "tr", + } ) // parseFormatChartSet provides function to parse the format settings of the @@ -63,7 +104,6 @@ func parseFormatChartSet(formatSet string) *formatChart { // // import ( // "fmt" -// "os" // // "github.com/xuri/excelize" // ) @@ -83,7 +123,6 @@ func parseFormatChartSet(formatSet string) *formatChart { // err := xlsx.SaveAs("./Workbook.xlsx") // if err != nil { // fmt.Println(err) -// os.Exit(1) // } // } // |