diff --git a/examples/pie_chart/main.go b/examples/pie_chart/main.go index d5c9bcd..9062311 100644 --- a/examples/pie_chart/main.go +++ b/examples/pie_chart/main.go @@ -24,8 +24,8 @@ func drawChart(res http.ResponseWriter, req *http.Request) { }, } - res.Header().Set("Content-Type", "image/svg+xml") - err := pie.Render(chart.SVG, res) + res.Header().Set("Content-Type", "image/png") + err := pie.Render(chart.PNG, res) if err != nil { fmt.Printf("Error rendering pie chart: %v\n", err) } diff --git a/examples/stock_analysis/main.go b/examples/stock_analysis/main.go index 69a4501..fd131ae 100644 --- a/examples/stock_analysis/main.go +++ b/examples/stock_analysis/main.go @@ -15,7 +15,7 @@ func drawChart(res http.ResponseWriter, req *http.Request) { Name: "SPY", Style: chart.Style{ Show: true, - StrokeColor: chart.GetDefaultSeriesStrokeColor(0), + StrokeColor: chart.GetDefaultColor(0), }, XValues: xv, YValues: yv, diff --git a/images/pie_chart.png b/images/pie_chart.png new file mode 100644 index 0000000..2117e01 Binary files /dev/null and b/images/pie_chart.png differ