Skip to content

Fix fill parameter handling in plotHistogram#214

Open
0xMuluh wants to merge 3 commits intodevelfrom
fill
Open

Fix fill parameter handling in plotHistogram#214
0xMuluh wants to merge 3 commits intodevelfrom
fill

Conversation

@0xMuluh
Copy link
Contributor

@0xMuluh 0xMuluh commented Jan 5, 2026

ping #195

Copy link
Contributor

@TuomasBorman TuomasBorman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resulting plot looks good!

Comment on lines +326 to +328
.plot_hist_bar(df, geom_bar, TRUE, color, fill, alpha, scales,
position, ...)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

End every function with return()

Comment on lines +337 to +339
if (!is.null(fill_by)) {
mapping <- aes(x = value, fill = .data[[fill_by]])
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the same formatting as in rest of the package

Comment on lines +314 to +316
geom_fun <- switch(layout, histogram = geom_histogram, density = geom_density)
.plot_hist_bar(df, geom_fun, layout == "histogram", color, fill,
alpha, scales, position, ...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use_position is redundant. You can overwrite position <- NULL if layout == "density"

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.31%. Comparing base (5a7c3ae) to head (1443d00).
⚠️ Report is 12 commits behind head on devel.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #214      +/-   ##
==========================================
+ Coverage   57.71%   60.31%   +2.60%     
==========================================
  Files          21       21              
  Lines        3493     3669     +176     
==========================================
+ Hits         2016     2213     +197     
+ Misses       1477     1456      -21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants