Polynomial Trend line

i need to create a scatter plot with a best fit curve (Polynomial 2nd order), like the example on this link:

(This is a 4th order, but no problem i’m interesting to know the concept.

I have found a lot of example in the Plotly chart studio like the one above, but my problem is how to generate the trace or the parameters estimates (A, B, C), starting from my scatter dataseries.

Is it possibile directy in Plotly.js or i need an external library to calculate the values of the best fit curve and pass it to Plotly.js?

Thanks to anyone who wants to help me.

Were you able to figure this out? I need to do the same.

Hello Keval,

we have put this point in stand-by, and therefore we are still in the same situation.

If you have found a solution, i would appreciate very much if you would like share it with me.