???
This commit is contained in:
parent
9a5138b21d
commit
693a2ab66f
|
@ -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])),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user