Refactor rename the source files. and add more comments of pie plot

This commit is contained in:
weizili.360.laptop 2014-12-27 15:05:01 +08:00
parent 7c32e21a7e
commit 52531add09
3 changed files with 12 additions and 2 deletions

View File

@ -14,6 +14,17 @@ func (c *PieChart) Parse(ini *goini.INI) (map[string]string, error) {
args["SubTitle"], _ = ini.Get("SubTitle")
args["SeriesName"], _ = ini.Get("SeriesName")
/* Generate DataArray:
[
['Firefox', 45.0],
['IE', 26.8],
['Chrome', 12.8],
['Safari', 8.5],
['Opera', 6.2],
['Others', 0.7]
]
*/
DataArray := "[\n"
kv, _ := ini.GetKvmap(goini.DefaultSection)
for k, v := range kv {
@ -34,4 +45,3 @@ func (c *PieChart) Parse(ini *goini.INI) (map[string]string, error) {
func (c *PieChart) Template() string {
return TemplatePieHtml
}