Anyone have any experience creating a normal distribution graph with plotly?

I need to graph a single number/metric on a normal distribution using plotly, anyone have any experience with this?

Have you checked the Plotly docs on the web?

Perhaps you could give that a try if it seems close to what you are looking for.

Trying that, and I think it will work. It is in translating those examples to correctly address the image component where I’m stumbling. I’ll get it eventually. Unfortunately, most examples make use of plotly express, Which I think is not included in the Anvil plotly packages

express is included. Here is the announcement

and a wonderful tutorial.

Nice, I think this will help. I’ve tried running some of the examples, I think this is key: I’m constructing the graph object in the form which I use to render the .pdf. As such, import plotly express in that form’s init area. and I’m getting the error: ImportError: No module named plotly.express

In the Anvil documentation, I see the reference to the Anvil client-side Python API using an EntrypointTemplate… well beyond my beginner’s understanding.

I’ll keep studying/trying

I believe that Plotly express needs to be used from the server module.

You can see that mentioned in the announcement above.

It would seem so. So I can certainly do all of this in a server module, I just don’t know how to provide the necessary data to the form I’m using to build the .pdf report.

I’m currently calling this function from the server module, and then in that form “qs_free_report” - I pull data from a table and populate the different components in the form… This is an internal tool, so I can set my table to allow client code to read/edit the necessary tables. So, I think I would need to specify all of this from the client side

I’m not sure I follow why you would need to have everything built in the client. You may return a figure object from the server and stick that into a Plot component.

Perhaps I am misunderstanding the question.

1 Like

I just realized this is what I’ll need to do