Nbviewer renders correctly in Binder preview, but doesn't when I try to generate a link

One thing is that, given your nbviewer experience, your use case seems to currently rely on an active kernel, and so the most direct way to share it so that only what you want the user to be able to interact with it would be as a dashboard like app. Voila is the Jupyter ecosystem offering of that and it runs actively via MyBinder. All the examples at the Voila Gallery run via MyBinder. (Related to Voila is Appmode that lets notebook’s be apps and works via MyBinder, too.)

Only certain packages and features continue to work in the ‘static’ mode that nbviewer shares. From what I’ve seen, it has to be things that have underlying javascript. So if you are willing to alter your current implementation maybe you can plug into something that translates to working in so-called ‘static’-mode, too.
Plotly is one of the things that works and because it has its own widgets usually those work, too. Example. (Sadly I don’t have an example with a Plotly-based widgets, such as a dropdown menu handy. I probably should dig one up.)
If you are trying to make an active plot that you scan through frames, that works in nbviewer, too, see an example here.

Also works/has interacitvity in so-called ‘static’-mode that nbviewer offers:

(That list isn’t exhaustive. It just happens to be notes on what I know of.)

Embedded in my mention of VTK above, I touch upon Web Assembly. That is a possible direction, too. I know now that ipywidgets works in JupyterLite but I don’t think Voila yet works. That will be really great for your needs when it does.

You don’t share specifics on your plots or what you need to show and so it is hard to advise further. If you need some technical help along the lines of some of the stuff I references, you can use the Discourse system to message me directly.

(For the sake of others reading this, we are specifically talking about nbviewer’s static view. GitHub doesn’t offer as many abilities. In the early days, most people picked up on this quickly as early on GitHub didn’t try to even render any notebook that wasn’t super short. So super quickly users would learn about nbviwer. Now GitHub tries to do some displaying and a lot of users don’t pick up that is much more limited at this time still than nbviewer, and many don’t seem to know about nbviewer. I try to advise to people questioning GitHub’s abilities that to consider it a quick-preview and to use nbviewer that the Jupyter community offers for static and sharing with non-developers.)

1 Like