neuhausi / canvasXpress

CanvasXpress: A JavaScript Library for Data Analytics with Full Audit Trail Capabilities.
http://www.canvasXpress.org
290 stars 44 forks source link

Could canvasXpress respect gridlines in ggplot2 better? #148

Closed davidhodge931 closed 8 months ago

davidhodge931 commented 8 months ago

Particularly:

library(tidyverse)
library(palmerpenguins)
library(canvasXpress)

p <- penguins |> 
  ggplot() +
  geom_point(aes(x = flipper_length_mm, 
                 y = body_mass_g, 
                 colour = species,)) +
  theme(panel.grid = ggplot2::element_line(linewidth = 5)) +
  theme(panel.grid.major.x = element_blank()) +
  theme(panel.grid.minor = element_blank()) 

p

canvasXpress(p)

image

neuhausi commented 8 months ago

Fixed in version 48.6 too. The units are not honored as they will scale according to the size of the plot. cX-htmlwidget-2a56c0198d2ebf914823-cx

davidhodge931 commented 8 months ago

Works great :)