summaryrefslogtreecommitdiff
path: root/bookpipeline
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-08-27 21:26:45 +0100
committerNick White <git@njw.name>2019-08-27 21:26:45 +0100
commit877a718fa68af1ecc67c0e34dce9c6edf31191fc (patch)
tree3e03423811d4c359be36bbaeca5dfcaa4794d994 /bookpipeline
parent2d6a3a3ff743f24f29a0b8d8369911906e8eae3c (diff)
Add annotations for pages with confidence below 70
Diffstat (limited to 'bookpipeline')
-rw-r--r--bookpipeline/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/bookpipeline/main.go b/bookpipeline/main.go
index 63eb6bc..c202bad 100644
--- a/bookpipeline/main.go
+++ b/bookpipeline/main.go
@@ -231,9 +231,13 @@ func analyse(toanalyse chan string, up chan string, errc chan error, logger *log
}
sort.Slice(graphconf, func(i, j int) bool { return graphconf[i].pgnum < graphconf[j].pgnum })
var xvalues, yvalues []float64
+ var annotations []chart.Value2
for _, c := range graphconf {
xvalues = append(xvalues, c.pgnum)
yvalues = append(yvalues, c.conf)
+ if c.conf < 70 {
+ annotations = append(annotations, chart.Value2{Label: fmt.Sprintf("%.0f", c.pgnum), XValue: c.pgnum, YValue: c.conf})
+ }
}
mainSeries := chart.ContinuousSeries{
XValues: xvalues,
@@ -305,6 +309,9 @@ func analyse(toanalyse chan string, up chan string, errc chan error, logger *log
maxSeries,
chart.LastValueAnnotation(minSeries),
chart.LastValueAnnotation(maxSeries),
+ chart.AnnotationSeries{
+ Annotations: annotations,
+ },
//chart.ContinuousSeries{
// YAxis: chart.YAxisSecondary,
// XValues: xvalues,