axes label example and thin legend.

This commit is contained in:
Will Charczuk 2016-08-27 13:45:38 -07:00
parent dd89d27af5
commit 6fbc6caa9c
3 changed files with 109 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -72,6 +72,11 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
graph := chart.Chart{
Width: 1280,
Height: 720,
Background: chart.Style{
Padding: chart.Box{
Top: 50,
},
},
YAxis: chart.YAxis{
Name: "Elapsed Millis",
NameStyle: chart.StyleShow(),
@ -96,7 +101,7 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
},
}
graph.Elements = []chart.Renderable{chart.Legend(&graph)}
graph.Elements = []chart.Renderable{chart.LegendThin(&graph)}
res.Header().Set("Content-Type", "image/png")
graph.Render(chart.PNG, res)