tests are pretty helpful

This commit is contained in:
Will Charczuk 2016-07-30 09:38:43 -07:00
parent 9c96af2a22
commit bf38f3e718
4 changed files with 5 additions and 4 deletions

View file

@ -10,6 +10,7 @@ import (
func drawChart(res http.ResponseWriter, req *http.Request) {
sbc := chart.StackedBarChart{
Height: 512,
XAxis: chart.Style{
Show: true,
},
@ -48,8 +49,8 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
},
}
res.Header().Set("Content-Type", "image/svg+xml")
err := sbc.Render(chart.SVG, res)
res.Header().Set("Content-Type", "image/png")
err := sbc.Render(chart.PNG, res)
if err != nil {
fmt.Printf("Error rendering chart: %v\n", err)
}