parcats icon indicating copy to clipboard operation
parcats copied to clipboard

extend/customize hoverinfo

Open MichelMoser opened this issue 2 years ago • 4 comments

Dear @erblast,

I really enjoy your packages and am currently trying to extend some hover options (which you already started).

image

As i am still new to plotly, i am currently stuck with some questions and was wondering if you could point me to the respective code junks where they are to solve.

As shown above, i extended hovertemplate but would like to populate it with other data like "count". I could not find "count" being initiated in the repo. Could you point me to it so i could extend it to other data variables?
Or is this coded in the plotly.js?

Of course, all code will be pushed to your repo if you agree to. Thank you, michel

MichelMoser avatar Mar 09 '22 20:03 MichelMoser

Hello,

looks like you are up to a good start, so far parcats does not create the hover text directly everything is done by plotly.js in this file. parcats only collects the hoveron and the hoverinfo parameters and passes them on. So the counts and probabilities are calculated by the java script. I dont know if you can manage to reference them when you provide the template.

I am happy to receive a pull request when you can get this to work.

All the best

erblast avatar Mar 09 '22 22:03 erblast

Hi,

Thank you, that helps a lot. Time to finally dive into js then :)

MichelMoser avatar Mar 10 '22 07:03 MichelMoser

Just a hint maybe you know this already but if you go to the plotly.js documentation you can load any of the example plots on a platform called code pen and manipulate them using java code interactively. I don't know java but I used this together with the documentation to figure out how the code in java should look like for the plot that I want and then see how I need to construct the parameters in R to send to Java.

erblast avatar Mar 10 '22 08:03 erblast

Great, thank you for the hint.

MichelMoser avatar Mar 10 '22 08:03 MichelMoser