trelliscopejs icon indicating copy to clipboard operation
trelliscopejs copied to clipboard

Understanding state in trelliscope function

Open JauntyJJS opened this issue 6 years ago • 1 comments

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 ?

JauntyJJS avatar Nov 19 '19 07:11 JauntyJJS

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.

hafen avatar Nov 23 '19 08:11 hafen