mirror of https://github.com/zieckey/gochart.git
Refactor rename the source files. and add more comments of pie plot
This commit is contained in:
parent
09366e159a
commit
bc3567b4d0
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue