diff --git a/data_parser.go b/chart_parser.go similarity index 100% rename from data_parser.go rename to chart_parser.go diff --git a/pie_parser.go b/chart_parser_pie.go similarity index 78% rename from pie_parser.go rename to chart_parser_pie.go index 47ff644..2aa9464 100644 --- a/pie_parser.go +++ b/chart_parser_pie.go @@ -13,6 +13,17 @@ func (c *PieChart) Parse(ini *goini.INI) (map[string]string, error) { args["Title"], _ = ini.Get("Title") 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) @@ -33,5 +44,4 @@ func (c *PieChart) Parse(ini *goini.INI) (map[string]string, error) { func (c *PieChart) Template() string { return TemplatePieHtml -} - +} \ No newline at end of file diff --git a/spline_parser.go b/chart_parser_spline.go similarity index 100% rename from spline_parser.go rename to chart_parser_spline.go