pulling generate grid lines into its own function

This commit is contained in:
Will Charczuk 2016-07-12 19:22:02 -07:00
parent 249e9956d0
commit 1c3473f674
3 changed files with 35 additions and 35 deletions

View file

@ -46,12 +46,6 @@ func chartHandler(rc *web.RequestContext) web.ControllerResult {
Style: chart.Style{
Show: true,
},
GridMajorStyle: chart.Style{
Show: true,
},
GridMinorStyle: chart.Style{
Show: true,
},
},
YAxis: chart.YAxis{
Style: chart.Style{
@ -64,7 +58,7 @@ func chartHandler(rc *web.RequestContext) web.ControllerResult {
},
},
GridMajorStyle: chart.Style{
Show: true,
Show: false,
},
GridMinorStyle: chart.Style{
Show: true,
@ -75,12 +69,16 @@ func chartHandler(rc *web.RequestContext) web.ControllerResult {
Name: "a",
XValues: s1x,
YValues: s1y,
Style: chart.Style{
Show: true,
FillColor: chart.GetDefaultSeriesStrokeColor(0).WithAlpha(64),
},
},
chart.AnnotationSeries{
Name: fmt.Sprintf("%s - Last Value", "Test"),
Style: chart.Style{
Show: true,
StrokeColor: chart.DefaultSeriesStrokeColors[0],
StrokeColor: chart.GetDefaultSeriesStrokeColor(0),
},
Annotations: []chart.Annotation{
chart.Annotation{