pie chart image && build fix.
This commit is contained in:
parent
fded346ae7
commit
df971b61d1
3 changed files with 3 additions and 3 deletions
|
@ -24,8 +24,8 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
res.Header().Set("Content-Type", "image/svg+xml")
|
res.Header().Set("Content-Type", "image/png")
|
||||||
err := pie.Render(chart.SVG, res)
|
err := pie.Render(chart.PNG, res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error rendering pie chart: %v\n", err)
|
fmt.Printf("Error rendering pie chart: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||||
Name: "SPY",
|
Name: "SPY",
|
||||||
Style: chart.Style{
|
Style: chart.Style{
|
||||||
Show: true,
|
Show: true,
|
||||||
StrokeColor: chart.GetDefaultSeriesStrokeColor(0),
|
StrokeColor: chart.GetDefaultColor(0),
|
||||||
},
|
},
|
||||||
XValues: xv,
|
XValues: xv,
|
||||||
YValues: yv,
|
YValues: yv,
|
||||||
|
|
BIN
images/pie_chart.png
Normal file
BIN
images/pie_chart.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
Loading…
Reference in a new issue