ardata-fr/mschart

Scatterchart settings

Closed this issue · 2 comments

It seems like the style "lineMarker" and "smoothMarker" have the same effect. I used "lineMarker" and was expecting that it would produce straight lines connecting the markers, but the lines are smooth. The markers are also connected according to the order of the y values instead of the x values as can be seen in the below example. Is there an option that we can choose how we want the markers to be connect?

I appreciate your attention to this. Thank you!

Example:

library(tidyverse)
library(mschart)
library(officer)

data <-
 data.frame(
  y = c(1, 5, 2, 9, 7.5, 6, 8, 1, 3, 7),
  x = c(1, 3, 4, 5.5, 6, 1, 3, 4, 5.5, 6),
  color = c(rep("red", 5), rep("blue", 5))
 )

chart <-
 ms_scatterchart(data = data,
                 x = "x",
                 y = "y",
                 group = "color") %>%
 chart_settings(style = "lineMarker")


pptx_obj <- read_pptx() %>%
 add_slide(layout = "Title and Content", master = "Office Theme") %>%
 ph_with(value = chart, location = ph_location_type(type = "body")) %>%
 print(target = "example_linemarker.pptx")

The chart created:

image

Hello, thanks for reporting this issue.

It is now fixed.

Thank you for looking into this! My collaborator and I have tried again and the issue with lineMarker and smoothMarker has been resolved. However, the data points are still connected based on their y values. Can you please help us check that out?

Your work is greatly appreciated! Thanks!