diff options
Diffstat (limited to 'graph.go')
-rw-r--r-- | graph.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,6 +1,7 @@ package bookpipeline import ( + "errors" "fmt" "io" "path/filepath" @@ -61,6 +62,10 @@ func Graph(confs map[string]*Conf, bookname string, w io.Writer) error { } sort.Slice(graphconf, func(i, j int) bool { return graphconf[i].Pgnum < graphconf[j].Pgnum }) + if len(graphconf) == 0 { + return errors.New("No valid confidences") + } + // Create main xvalues and yvalues, annotations and ticks var xvalues, yvalues []float64 var annotations []chart.Value2 |