hafen / trelliscopejs

TrelliscopeJS R Package
https://hafen.github.io/trelliscopejs
Other
263 stars 38 forks source link

Understanding state in trelliscope function #85

Open JauntyJJS opened 5 years ago

JauntyJJS commented 5 years ago

Hi,

I managed to create a trelliscope that is able to have a state that sort certain cognostics automatically in acending or decending order and select what labels to display by default. For example

state = list(sort = list(sort_spec("Transition_Name",dir = "asc"),
                                     sort_spec("DataStage",dir = "dsc")),
                         labels = c("Transition_Name","DataStage","bqc_rsd","Area"))

May I ask if it is possible to set a state that has filtering capabilities ? For example, create a state that filters "Area" between two values ?

hafen commented 4 years ago

This is a work in progress, nothing committed yet. However, if you install from the dev branch, you will notice that the application state is now preserved in the URL. So as a workaround, if you are creating a display that you would like to share with someone in a pre-filtered state, you can open the display, specify the filtering, and then either share that URL, which when clicked will open the display in the filtered state. I'll let you know when the capability to pre-specify filtering is built in to the R package. Feel free to ping here if it has been a while.