feat: support customization of dot fill color, #181
This commit is contained in:
parent
c1468e8ae4
commit
5bb1a1f0bc
1 changed files with 8 additions and 3 deletions
7
style.go
7
style.go
|
@ -53,6 +53,7 @@ type Style struct {
|
|||
StrokeDashArray []float64
|
||||
|
||||
DotColor drawing.Color
|
||||
DotFillColor drawing.Color
|
||||
DotWidth float64
|
||||
|
||||
DotWidthProvider SizeProvider
|
||||
|
@ -429,10 +430,14 @@ func (s Style) GetFillOptions() Style {
|
|||
|
||||
// GetDotOptions returns the dot components.
|
||||
func (s Style) GetDotOptions() Style {
|
||||
fillColor := s.DotColor
|
||||
if !s.DotFillColor.IsZero() {
|
||||
fillColor = s.DotFillColor
|
||||
}
|
||||
return Style{
|
||||
ClassName: s.ClassName,
|
||||
StrokeDashArray: nil,
|
||||
FillColor: s.DotColor,
|
||||
FillColor: fillColor,
|
||||
StrokeColor: s.DotColor,
|
||||
StrokeWidth: 1.0,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue