Helper API refactor (#40)

* api cleaup

* updates

* wtf

* updates

* snapshot.

* tweaks

* snapshot

* api tweaks.

* updates

* updates

* updates

* changes.

* updates

* updates

* sequence => seq

* dont need to use curl, just using wget

* fixing examples
This commit is contained in:
Will Charczuk 2017-05-12 17:12:23 -07:00 committed by GitHub
parent 43212f871f
commit 03708a90ef
100 changed files with 1687 additions and 1055 deletions

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before After
Before After