JohnCoene / g2r

📈 Grammar of graphics for interactive visualisations
Other
148 stars 10 forks source link

`conf_font` not having an effect #7

Open ttzhou opened 4 years ago

ttzhou commented 4 years ago
mtcars %>%
  g2r::g2(asp(x = wt, y = mpg)) %>%
  g2r::fig_point() %>%
  g2r::conf_font("Arial")

looks identical to

mtcars %>%
  g2r::g2(asp(x = wt, y = mpg)) %>%
  g2r::fig_point() %>%
  g2r::conf_font("Roboto")

Couldn't figure out why - g2r.js sets G2.Global.fontFamily = x.font, and checking the str indeed shows that x$font is the correct setting. Maybe js side?