first value sits in GetValues(0), not in (1).
This commit is contained in:
parent
0558d6eb30
commit
057ba70965
1 changed files with 2 additions and 2 deletions
4
draw.go
4
draw.go
|
@ -49,10 +49,10 @@ func (d draw) LineSeries(r Renderer, canvasBox Box, xrange, yrange Range, style
|
||||||
|
|
||||||
vxprev := 0.0
|
vxprev := 0.0
|
||||||
if vs.Len() > 0 {
|
if vs.Len() > 0 {
|
||||||
vxprev, _ = vs.GetValues( 1 ) // make sure vxprev starts at the beginning
|
vxprev, _ = vs.GetValues( 0 ) // make sure vxprev starts at the beginning
|
||||||
}
|
}
|
||||||
maxspan := style.GetStrokeMaxSpanGap()
|
maxspan := style.GetStrokeMaxSpanGap()
|
||||||
r.MoveTo(x0, y0)
|
r.MoveTo(x0, y0)
|
||||||
for i := 1; i < vs.Len(); i++ {
|
for i := 1; i < vs.Len(); i++ {
|
||||||
vx, vy = vs.GetValues(i)
|
vx, vy = vs.GetValues(i)
|
||||||
x = cl + xrange.Translate(vx)
|
x = cl + xrange.Translate(vx)
|
||||||
|
|
Loading…
Reference in a new issue