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

Charts vignette #478

Merged
merged 10 commits into from
Dec 18, 2022
Merged

Charts vignette #478

merged 10 commits into from
Dec 18, 2022

Conversation

JanMarvin
Copy link
Owner

This includes changes in

  • wb_add_plot() example and replaces the qplot() function with ggplot()
  • changes wb_add_image() function to add_drawing() the previous did not work as expected in the example

@JanMarvin
Copy link
Owner Author

# unsure how to fix this case
wb <- wb_load("https://github.com/JanMarvin/openxlsx-data/raw/main/unemployment-nrw202208.xlsx")
wb$add_worksheet()

# should use sheet 23 with drawings  24
img <- system.file("extdata", "einstein.jpg", package = "openxlsx2")
wb$add_image(file = img, startRow = 5, startCol = 3, width = 6, height = 5)

@JanMarvin
Copy link
Owner Author

It's a bit late and I have confused myself a couple of times already. Maybe its fixed now:

img <- system.file("extdata", "einstein.jpg", package = "openxlsx2")

# works
wb <- wb_load("https://github.com/JanMarvin/openxlsx-data/raw/main/unemployment-nrw202208.xlsx")
wb$add_worksheet()
wb$add_image(file = img, startRow = 5, startCol = 3, width = 6, height = 5)

# works
wb <- wb_workbook()$add_worksheet()$add_worksheet()$add_worksheet()$
  add_image(1, file = img, startRow = 5, startCol = 3, width = 6, height = 5)$
  add_image(3, file = img, startRow = 5, startCol = 3, width = 6, height = 5)

@JanMarvin JanMarvin merged commit dde657d into main Dec 18, 2022
@JanMarvin JanMarvin deleted the charts_vignette branch December 18, 2022 07:59
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.

None yet

1 participant