axes label example and thin legend.
This commit is contained in:
parent
dd89d27af5
commit
6fbc6caa9c
3 changed files with 109 additions and 5 deletions
BIN
_examples/axes_labels/output.png
Normal file
BIN
_examples/axes_labels/output.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue