Issue: We use R as a backend and Angular for the frontend. We analyze the data in R and send a final output of data in JSON format to Angular. Then in Angular, we give import that data in plotly.js for plotting graphs.
But The statistical plots were incorrect because R plotly provides the functionality to use statistical functions directly for plotting and that’s why the plot becomes editable in a statistical way but plotly js does not support statistical functions and the plots are displayed in a simple line or bar graph. R plotly can also embed ggplot (a package used to plot analytical plots) as ggplotly but this functionality is provided only by R, not by Plotly JS.
Solutions that are tried :
a. Write the plotly code in R and return the plot’s HTML to Angular. Use inner HTML or iframe to
b. Write the plotly code in R and return plotly json from R. directly assign the JSON to angular plotly
object. Not working as R return the code in HTML widget form.
c. Write the plotly code in R and post the plot on URL of the widget present in Angular. Attach a link
to the box/widget where we need to show the graph and make it accessible from R. Not possible in
Angular to make a URL out of a widget.
d. How to show these statistical graphs in Angular UI
I Hope you will solve these issue. Thank you in advance.