market hours tweaks.
This commit is contained in:
parent
c3a066aecd
commit
b1cd8bd2e3
8 changed files with 253 additions and 39 deletions
|
|
@ -2,14 +2,13 @@ package main
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/wcharczuk/go-chart"
|
||||
)
|
||||
|
||||
func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||
start := time.Date(2016, 07, 04, 12, 0, 0, 0, chart.Date.Eastern())
|
||||
end := time.Date(2016, 07, 06, 12, 0, 0, 0, chart.Date.Eastern())
|
||||
start := chart.Date.Date(2016, 6, 20, chart.Date.Eastern())
|
||||
end := chart.Date.Date(2016, 07, 21, chart.Date.Eastern())
|
||||
xv := chart.Sequence.MarketHours(start, end, chart.NYSEOpen, chart.NYSEClose, chart.Date.IsNYSEHoliday)
|
||||
yv := chart.Sequence.RandomWithAverage(len(xv), 200, 10)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue