mostly working

This commit is contained in:
Will Charczuk 2019-02-13 18:55:13 -08:00
parent 26eaa1d898
commit 5f42a580a9
47 changed files with 914 additions and 637 deletions

View file

@ -4,8 +4,7 @@ import (
"fmt"
"net/http"
"github.com/wcharczuk/go-chart"
util "github.com/wcharczuk/go-chart/util"
chart "github.com/wcharczuk/go-chart"
)
func drawChart(res http.ResponseWriter, req *http.Request) {
@ -22,7 +21,7 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
TickPosition: chart.TickPositionBetweenTicks,
ValueFormatter: func(v interface{}) string {
typed := v.(float64)
typedDate := util.Time.FromFloat64(typed)
typedDate := chart.TimeFromFloat64(typed)
return fmt.Sprintf("%d-%d\n%d", typedDate.Month(), typedDate.Day(), typedDate.Year())
},
},