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
7c32e21a7e
commit
52531add09
|
@ -13,6 +13,17 @@ func (c *PieChart) Parse(ini *goini.INI) (map[string]string, error) {
|
||||||
args["Title"], _ = ini.Get("Title")
|
args["Title"], _ = ini.Get("Title")
|
||||||
args["SubTitle"], _ = ini.Get("SubTitle")
|
args["SubTitle"], _ = ini.Get("SubTitle")
|
||||||
args["SeriesName"], _ = ini.Get("SeriesName")
|
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"
|
DataArray := "[\n"
|
||||||
kv, _ := ini.GetKvmap(goini.DefaultSection)
|
kv, _ := ini.GetKvmap(goini.DefaultSection)
|
||||||
|
@ -33,5 +44,4 @@ func (c *PieChart) Parse(ini *goini.INI) (map[string]string, error) {
|
||||||
|
|
||||||
func (c *PieChart) Template() string {
|
func (c *PieChart) Template() string {
|
||||||
return TemplatePieHtml
|
return TemplatePieHtml
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue