feat: support radar option of echarts
This commit is contained in:
parent
570828d35f
commit
b93d096633
10 changed files with 411 additions and 56 deletions
19
draw.go
19
draw.go
|
|
@ -322,3 +322,22 @@ func (d *Draw) polygon(center Point, radius float64, sides int) {
|
|||
d.lineTo(points[0].X, points[0].Y)
|
||||
d.Render.Stroke()
|
||||
}
|
||||
|
||||
func (d *Draw) fill(points []Point, s chart.Style) {
|
||||
if !s.ShouldDrawFill() {
|
||||
return
|
||||
}
|
||||
r := d.Render
|
||||
var x, y int
|
||||
s.GetFillOptions().WriteDrawingOptionsToRenderer(r)
|
||||
for index, point := range points {
|
||||
x = point.X
|
||||
y = point.Y
|
||||
if index == 0 {
|
||||
d.moveTo(x, y)
|
||||
} else {
|
||||
d.lineTo(x, y)
|
||||
}
|
||||
}
|
||||
r.Fill()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue