From 693a2ab66f023a47cd00ac72e4f728074c8ee077 Mon Sep 17 00:00:00 2001 From: Will Charczuk Date: Mon, 11 Jul 2016 18:49:50 -0700 Subject: [PATCH] ??? --- testserver/main.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/testserver/main.go b/testserver/main.go index 86eddca..a57cb09 100644 --- a/testserver/main.go +++ b/testserver/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "log" "math/rand" "net/http" @@ -61,6 +62,20 @@ func chartHandler(rc *web.RequestContext) web.ControllerResult { XValues: s1x, YValues: s1y, }, + chart.AnnotationSeries{ + Name: fmt.Sprintf("%s - Last Value", "Test"), + Style: chart.Style{ + Show: true, + StrokeColor: chart.DefaultSeriesStrokeColors[0], + }, + Annotations: []chart.Annotation{ + chart.Annotation{ + X: float64(s1x[len(s1x)-1].Unix()), + Y: s1y[len(s1y)-1], + Label: fmt.Sprintf("%s - %s", "test", chart.FloatValueFormatter(s1y[len(s1y)-1])), + }, + }, + }, }, }