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
11
style.go
11
style.go
|
@ -52,8 +52,9 @@ type Style struct {
|
|||
StrokeColor drawing.Color
|
||||
StrokeDashArray []float64
|
||||
|
||||
DotColor drawing.Color
|
||||
DotWidth float64
|
||||
DotColor drawing.Color
|
||||
DotFillColor drawing.Color
|
||||
DotWidth float64
|
||||
|
||||
DotWidthProvider SizeProvider
|
||||
DotColorProvider DotColorProvider
|
||||
|
@ -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