Skip to content

Commit

Permalink
doc: NEWS & authors update and import scales in NAMESPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgohel committed Apr 26, 2024
1 parent 944c6d5 commit b69fbf6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ importFrom(officer,ph_with)
importFrom(officer,read_pptx)
importFrom(officer,styles_info)
importFrom(officer,to_pml)
importFrom(scales,hue_pal)
importFrom(stats,as.formula)
importFrom(stats,setNames)
importFrom(stats,update)
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

* fix issue with dcast by making sure all data are preserved.

## New features

* Add support to set chart and plot area color and border by Stefan Moog ;
added four new theme arguments chart/plot_background and chart/plot_border,
new theme `theme_ggplot2()`.



# mschart 0.4.0

## New features
Expand Down
5 changes: 3 additions & 2 deletions R/themes.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@ theme_ggplot2 <- function(x, base_size = 11, base_family = "Arial") {
#'
#' p <- theme_ggplot2(p)
#' p <- chart_fill_ggplot2(p)
#' @importFrom scales hue_pal
chart_fill_ggplot2 <- function(x, stroke = TRUE) {
if (!is.null(x$group)) {
groups <- unique(x$data[[x$group]])
ngroups <- length(groups)
pal <- scales::hue_pal()(ngroups)
pal <- hue_pal()(ngroups)
names(pal) <- groups
} else {
pal <- scales::hue_pal()(1)
pal <- hue_pal()(1)
}

x <- chart_data_fill(x, values = pal)
Expand Down
2 changes: 2 additions & 0 deletions man/mschart.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b69fbf6

Please sign in to comment.