I have constructed below code from the previous questions asked in community.
I want to have a download option for the chart that I dynamically generate as HTMLWidgets.widget.
Unfortunately, I get a blank "chart.png" in the download.
Please help!
As per the suggestion I changed the code to following. The package is installed, but I am still getting a blank test.html as well as the chart.png file. Is there a way to check if the data in table_1 is correct?
The last two functions are obsolete. I changed the code accordingly. The first three are as follows.
I create a D3.js lib based HTMLWidgets.widget(). There I have all the js etc. to create a custom rshiny widget using java script.
Hence, D3Table is a table widget, which calls htmlwidgets::createwidget(). The D3TableOutput calls htmlwidgets::shinyWidgetOutput and renderD3Table calls htmlwidgets::shinyRenderWidget functions.
In the end, the server.R gives me the required table output. The problem is in the download section where for some reason everything is blank.
I think this is going to be hard for a fellow forum user to debug, as you are reporting issue with javascript codes that are private to yourself. Perhaps you could engage with htmlwidgets community i.e. issues. ? ramnathv/htmlwidgets: HTML Widgets for R (github.com)
but I expect that whoever you look to get support from would need access to a representative example of the widget you would wish to saveout.
and now in server.R i want to have something like below.
There is a widget called C3StackedAreaChart. I want to fill the place for widget_to_be_saved in saveWidget of downloadHandler.
I figured out the problem due to which my plot was blank. It was due to a call to shiny as below inside the htmlwidget.
Shiny.addCustomMessageHandler("setNormalization",
function setNormalization (message) {}
I am trying to explore options to extract a part of html I want to download and handle it in javascript itself. I have no idea if it is actually possible.
Please guide me how to use the download handler with a widget using shiny.