Skip to content

Commit a21a769

Browse files
committed
feature: refactor guides
1 parent afe6925 commit a21a769

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/providers/gofpdf/chart/chart.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,21 @@ type chart struct {
1313
pdf gofpdfwrapper.Fpdf
1414
font core.Font
1515
defaultLineWidth float64
16+
defaultLineColor props.Color
1617
}
1718

1819
func NewChart(pdf gofpdfwrapper.Fpdf, font core.Font) *chart {
1920
return &chart{
2021
pdf: pdf,
2122
font: font,
2223
defaultLineWidth: linestyle.DefaultLineThickness,
24+
defaultLineColor: props.BlackColor,
2325
}
2426
}
2527

2628
func (s chart) Add(margins *entity.Margins, cell *entity.Cell, width float64, height float64, props *props.Chart) {
2729
s.font.SetFont(props.Font.Family, props.Font.Style, props.Font.Size)
30+
s.pdf.SetDrawColor(s.defaultLineColor.Red, s.defaultLineColor.Green, s.defaultLineColor.Blue)
2831

2932
stepX, stepY := s.GetSteps(width, height, cell)
3033
s.horizontalLine(margins, cell, width, stepX, props)

0 commit comments

Comments
 (0)