tweaks to fix annotation series drawing.
This commit is contained in:
parent
01992b9afb
commit
c14ab6a4b2
3
chart.go
3
chart.go
|
@ -118,10 +118,11 @@ func (c Chart) Render(rp RendererProvider, w io.Writer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
c.drawCanvas(r, canvasBox)
|
c.drawCanvas(r, canvasBox)
|
||||||
|
c.drawAxes(r, canvasBox, xr, yr, yra, xt, yt, yta)
|
||||||
for index, series := range c.Series {
|
for index, series := range c.Series {
|
||||||
c.drawSeries(r, canvasBox, xr, yr, yra, series, index)
|
c.drawSeries(r, canvasBox, xr, yr, yra, series, index)
|
||||||
}
|
}
|
||||||
c.drawAxes(r, canvasBox, xr, yr, yra, xt, yt, yta)
|
|
||||||
c.drawTitle(r)
|
c.drawTitle(r)
|
||||||
|
|
||||||
for _, a := range c.Elements {
|
for _, a := range c.Elements {
|
||||||
|
|
|
@ -26,6 +26,11 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||||
},
|
},
|
||||||
Series: []chart.Series{
|
Series: []chart.Series{
|
||||||
chart.ContinuousSeries{
|
chart.ContinuousSeries{
|
||||||
|
Style: chart.Style{
|
||||||
|
Show: true,
|
||||||
|
StrokeColor: chart.GetDefaultSeriesStrokeColor(0).WithAlpha(64),
|
||||||
|
FillColor: chart.GetDefaultSeriesStrokeColor(0).WithAlpha(64),
|
||||||
|
},
|
||||||
XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0},
|
XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0},
|
||||||
YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0},
|
YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user