fixing examples
This commit is contained in:
parent
4d93883953
commit
50b025e273
32 changed files with 87 additions and 67 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
|
||||
"github.com/wcharczuk/go-chart"
|
||||
"github.com/wcharczuk/go-chart/drawing"
|
||||
"github.com/wcharczuk/go-chart/seq"
|
||||
)
|
||||
|
||||
func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||
|
|
@ -25,8 +26,8 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
|
|||
DotWidth: 5,
|
||||
DotColorProvider: viridisByY,
|
||||
},
|
||||
XValues: chart.Sequence.Random(128, 1024),
|
||||
YValues: chart.Sequence.Random(128, 1024),
|
||||
XValues: seq.Range(0, 127),
|
||||
YValues: seq.New(seq.NewRandom().WithLen(128).WithMax(1024)).Array(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -50,8 +51,8 @@ func unit(res http.ResponseWriter, req *http.Request) {
|
|||
},
|
||||
Series: []chart.Series{
|
||||
chart.ContinuousSeries{
|
||||
XValues: chart.Sequence.Float64(0, 4, 1),
|
||||
YValues: chart.Sequence.Float64(0, 4, 1),
|
||||
XValues: seq.RangeWithStep(0, 4, 1),
|
||||
YValues: seq.RangeWithStep(0, 4, 1),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 26 KiB |
Loading…
Add table
Add a link
Reference in a new issue