feat: support customization of dot fill color, #181

This commit is contained in:
vicanso 2021-12-12 10:30:12 +08:00
parent c1468e8ae4
commit 5bb1a1f0bc

View file

@ -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,
}