Hi, experienced R user here, but first time ever posting on github, so please excuse any errors and just let me know if I am not following conventions.
I'm using crosstalk with plot_ly. If the column I provide as filter_slider is an integer, it seems logical to me that decimals should not be shown, i.e., its verbose that I have to provide round = T as an option.
For example in:
library(plotly)
library(dplyr)
library(crosstalk)
df <- data.frame(
area = rep(c('a', 'b', 'c'), 3),
value = runif(9, min = 0, max =10),
year = as.integer(c(1,1,1,2,2,2,3,3,3))
) %>% highlight_key()
widget <- filter_slider(id = 'year', label = 'Year', dfk, ~mnum)
bscols(
widget,
plot_ly(df, x = ~year, y = ~value) %>% add_lines(color = ~area)
)
...the slider lets me select 6.5, 4.2, and so on, which shouldn't be possible given that year is an integer.
Hi, experienced R user here, but first time ever posting on github, so please excuse any errors and just let me know if I am not following conventions.
I'm using
crosstalkwithplot_ly. If the column I provide asfilter_slideris an integer, it seems logical to me that decimals should not be shown, i.e., its verbose that I have to provideround = Tas an option.For example in:
...the slider lets me select 6.5, 4.2, and so on, which shouldn't be possible given that
yearis an integer.