Commit
Author: Noam Preil [noam@pixelhero.dev]
Committer: Drew DeVault [sir@cmpwn.com] Mon, 30 Nov 2020 02:54:52 +0000
Hash: 296bb9a4ecf555b3d877edf674c6aae1fda7f1b3
Timestamp: Mon, 30 Nov 2020 02:54:52 +0000 (4 years ago)

+0 -8 +/-1 browse
Remove undocumented legend option
1diff --git a/main.go b/main.go
2index c1ffa77..ab164e9 100644
3--- a/main.go
4+++ b/main.go
5 @@ -186,12 +186,6 @@ func registerExtension(router chi.Router, extension string, mime string) {
6 height = vg.Length(h) * vg.Inch
7 }
8
9- // Undocumented option
10- var legend string
11- if l, ok := args["legend"]; ok {
12- legend = l[0]
13- }
14-
15 // Label template
16 var label string
17 if l, ok := args["label"]; ok {
18 @@ -274,8 +268,6 @@ func registerExtension(router chi.Router, extension string, mime string) {
19 plotters[i] = l
20 if label != "" && len(res.Metric) > 2 && res.Metric[0] == '{' && res.Metric[len(res.Metric)-1] == '}' {
21 handleLabel(p, l, label, res.Metric)
22- } else if legend != "" {
23- p.Legend.Add(legend, l)
24 } else {
25 p.Legend.Add(res.Metric, l)
26 }