big api overhauls.
This commit is contained in:
parent
d84d6790c0
commit
cbc0002d2a
33 changed files with 356 additions and 297 deletions
|
|
@ -30,8 +30,8 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
|
|||
},
|
||||
Series: []chart.Series{
|
||||
chart.ContinuousSeries{
|
||||
XValues: chart.Seq(1.0, 100.0),
|
||||
YValues: chart.SeqRand(100.0, 256.0),
|
||||
XValues: chart.Sequence.Float64(1.0, 100.0),
|
||||
YValues: chart.Sequence.Random(100.0, 256.0),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -57,8 +57,8 @@ func drawChartDefault(res http.ResponseWriter, req *http.Request) {
|
|||
},
|
||||
Series: []chart.Series{
|
||||
chart.ContinuousSeries{
|
||||
XValues: chart.Seq(1.0, 100.0),
|
||||
YValues: chart.SeqRand(100.0, 256.0),
|
||||
XValues: chart.Sequence.Float64(1.0, 100.0),
|
||||
YValues: chart.Sequence.Random(100.0, 256.0),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
|
|||
|
||||
//note we have to do this as a separate step because we need a reference to graph
|
||||
graph.Elements = []chart.Renderable{
|
||||
chart.CreateLegend(&graph),
|
||||
chart.Legend(&graph),
|
||||
}
|
||||
|
||||
res.Header().Set("Content-Type", "image/png")
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
|
|||
|
||||
mainSeries := chart.ContinuousSeries{
|
||||
Name: "A test series",
|
||||
XValues: chart.Seq(1.0, 100.0), //generates a []float64 from 1.0 to 100.0 in 1.0 step increments, or 100 elements.
|
||||
YValues: chart.SeqRand(100, 100), //generates a []float64 randomly from 0 to 100 with 100 elements.
|
||||
XValues: chart.Sequence.Float64(1.0, 100.0), //generates a []float64 from 1.0 to 100.0 in 1.0 step increments, or 100 elements.
|
||||
YValues: chart.Sequence.Random(100, 100), //generates a []float64 randomly from 0 to 100 with 100 elements.
|
||||
}
|
||||
|
||||
// note we create a LinearRegressionSeries series by assignin the inner series.
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
|
|||
|
||||
mainSeries := chart.ContinuousSeries{
|
||||
Name: "A test series",
|
||||
XValues: chart.Seq(1.0, 100.0), //generates a []float64 from 1.0 to 100.0 in 1.0 step increments, or 100 elements.
|
||||
YValues: chart.SeqRand(100, 100), //generates a []float64 randomly from 0 to 100 with 100 elements.
|
||||
XValues: chart.Sequence.Float64(1.0, 100.0), //generates a []float64 from 1.0 to 100.0 in 1.0 step increments, or 100 elements.
|
||||
YValues: chart.Sequence.Random(100, 100), //generates a []float64 randomly from 0 to 100 with 100 elements.
|
||||
}
|
||||
|
||||
// note we create a SimpleMovingAverage series by assignin the inner series.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue