Commit
+6 -3 +/-2 browse
1 | diff --git a/README.md b/README.md |
2 | index 3ae2b2f..ee33b56 100644 |
3 | --- a/README.md |
4 | +++ b/README.md |
5 | @@ -32,9 +32,8 @@ set the query parameters as appropriate: |
6 | - **stacked**: set to create an area chart instead of a line chart |
7 | - **since**: [time.ParseDuration][1] to set distance in the past to start |
8 | charting from |
9 | - - **width**: chart width in inches |
10 | - - **height**: chart height in inches |
11 | + - **width**, **height**: adjust chart dimensions in inches |
12 | - **step**: number of seconds between data points |
13 | - - **max**: maximum Y value |
14 | + - **min**, **max**: Y axis limits |
15 | |
16 | [1]: https://golang.org/pkg/time/#ParseDuration |
17 | diff --git a/main.go b/main.go |
18 | index 3ab820e..4d22670 100644 |
19 | --- a/main.go |
20 | +++ b/main.go |
21 | @@ -190,6 +190,10 @@ func main() { |
22 | m, _ := strconv.ParseFloat(ms[0], 64) |
23 | p.Y.Max = m |
24 | } |
25 | + if ms, ok := args["min"]; ok { |
26 | + m, _ := strconv.ParseFloat(ms[0], 64) |
27 | + p.Y.Min = m |
28 | + } |
29 | p.Legend.Top = true |
30 | |
31 | sums := make([]float64, len(data[0].Values)) |