Skip to content

Commit

Permalink
Adds a few more comments. #39
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariano Gappa committed Aug 19, 2018
1 parent cd7c48f commit 7b34b79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chartjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ Category2 2
Category3 3
`
reader := strings.NewReader(fileContent)
lineFormat, _ := format.NewLineFormat("sf", '\t', "") // Look into format.Parse to infer the line format
ds, err := dataset.New(reader, lineFormat)
lineFormat, _ := format.NewLineFormat("sf", '\t', "") // Look into format.Parse to infer the line format
ds, err := dataset.New(reader, lineFormat) // Construct dataset manually if not reading a file
if err != nil {
log.Fatal(err)
}
chart := chartjs.New(chartjs.Pie, *ds, chartjs.Options{Title: "Example chart"})
if err := chart.Build(chartjs.OutputAll, os.Stdout); err != nil {
chart := chartjs.New(chartjs.Pie, *ds, chartjs.Options{Title: "Example chart"}) // Consult godoc for ChartTypes
if err := chart.Build(chartjs.OutputAll, os.Stdout); err != nil { // Consult godoc for OutputModes
log.Fatal(err)
}
}
Expand Down

0 comments on commit 7b34b79

Please sign in to comment.