Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(heatmap): fix bug legend was not fully boxed #585

Merged
merged 3 commits into from
Nov 5, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions heatmap_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ func (p HeatmapPrinter) generateColorLegend(buffer *bytes.Buffer, legendColWidth
}

func (p HeatmapPrinter) generateRGBLegend(buffer *bytes.Buffer, legendColWidth int) {
p.rgbLegendValue = 11
p.rgbLegendValue = 10
steps := len(p.RGBRange)
if steps < p.rgbLegendValue {
steps = p.rgbLegendValue
Expand Down Expand Up @@ -585,11 +585,14 @@ func (p HeatmapPrinter) boxLegend(buffer *bytes.Buffer, legend string, legendCol
}

func (p HeatmapPrinter) generateSeparatorRow(buffer *bytes.Buffer, legend string, legendColWidth int, top bool) {
p.rgbLegendValue = 10
steps := len(p.RGBRange)
if steps < p.rgbLegendValue {
steps = p.rgbLegendValue
}
steps *= 3
if p.LegendOnlyColoredCells {
steps *= 3
}

var xValue int
if p.EnableRGB {
Expand Down