Skip to content

Commit 85f72f2

Browse files
committed
Remove max lines and update marker line look
1 parent 6e1690e commit 85f72f2

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Given the following JSON output:
4545
You can graph the number of thread over time:
4646

4747
```
48-
jplot --url http://:8080/debug/vars Thread
48+
jplot --url http://:8080/debug/vars Threads
4949
```
5050

5151
![all](doc/single.png)

main.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -193,20 +193,12 @@ func graph(series []chart.Series, markers []chart.GridLine, width, height int) c
193193
FontSize: 9,
194194
}
195195
series[i] = s
196-
max := &chart.MaxSeries{
197-
Style: chart.Style{
198-
Show: true,
199-
StrokeColor: c,
200-
StrokeDashArray: []float64{5.0, 5.0},
201-
},
202-
InnerSeries: s,
203-
}
204196
last := chart.LastValueAnnotation(s, siValueFormater)
205197
last.Style.FillColor = c
206198
last.Style.FontColor = textColor(c)
207199
last.Style.FontSize = 9
208200
last.Style.Padding = chart.NewBox(2, 2, 2, 2)
209-
series = append(series, max, last)
201+
series = append(series, last)
210202
}
211203
}
212204
graph := chart.Chart{
@@ -231,9 +223,9 @@ func graph(series []chart.Series, markers []chart.GridLine, width, height int) c
231223
TickPosition: 10, // hide text with non-existing position
232224
GridMajorStyle: chart.Style{
233225
Show: true,
234-
StrokeColor: chart.ColorAlternateGray,
235-
StrokeWidth: 3.0,
236-
StrokeDashArray: []float64{5.0, 5.0},
226+
StrokeColor: chart.ColorAlternateGray.WithAlpha(100),
227+
StrokeWidth: 2.0,
228+
StrokeDashArray: []float64{2.0, 2.0},
237229
},
238230
GridLines: markers,
239231
}

0 commit comments

Comments
 (0)