Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dealing with explicitly provided widget id warning when using shiny #49

Closed
mihirasaraswati opened this issue Sep 13, 2016 · 4 comments
Closed

Comments

@mihirasaraswati
Copy link

I've built a shiny application that uses metricsgraphics to create histogram. When running the application I get the following error message:

Warning in output$histPlot(...) : Ignoring explicitly provided widget ID "mjs-acd1c2bc860bf1a81780a7603d6f7b"; Shiny doesn't use them

My app can be run with the following command:

shiny::runGitHub(repo = 'mihiriyer/mental')

My code is located here:
https://github.com/mihiriyer/mental/blob/master/app.R

The app seems to work fine and so should I even be worried since it is just a warning? Should I just suppress the message and move on?

@hrbrmstr
Copy link
Owner

aye. Shiny does it's own "thing" with widget id's which is somewhat frustrating given how multiple metricsgraphics widgets can be linked together automagically but also understandable since Shiny does much more automagically for developers. i haven't heard of it causing issues with Shiny apps, but you may not be able to easily link metricsgraphics charts together in a Shiny context.

@timelyportfolio
Copy link

timelyportfolio commented Sep 13, 2016

This is still ugly, but if you provide an elementId argument to the mjs_plot in lines, and then accept that if provided in lines, you would still get the warning, but linking could still occur for advanced users. In a Shiny context, a user will be required to assign an id, so we know each metricsgraphicsOutput will have a hopefully unique id.

@mihirasaraswati
Copy link
Author

Well I only have one graph so no linking is required... I've added options(warn =-1) to my server function and that has done the "trick". Thanks for the assist.

@ricardordb
Copy link

Workaround: plotly/plotly.R#985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants