Hi there
I am working on an ABMaterial app, I'm able to generate a chart and this gets rendered into its own canvas element as depicted below:
I mean to download the chart when the lime "cloud" button is clicked (top right). I have javascript to do that...
The alert method included here generates the data:image as depicted below. I want to trap this so that a download is executed instead, how do I pass this back to execute the download? Another option will be to save this to a file for emailing purposes. Can someone please advise how I can achieve this feat?
Thanks a million..
I am working on an ABMaterial app, I'm able to generate a chart and this gets rendered into its own canvas element as depicted below:
I mean to download the chart when the lime "cloud" button is clicked (top right). I have javascript to do that...
B4X:
Sub Download(InternalPage As ABMPage)
Dim sb As String
sb = $"var canvas = $("#${iID}").ejChart("export");
alert(canvas.toDataURL());
this.href = canvas.toDataURL();"$
InternalPage.ws.Eval(sb, Array As Object(ABMComp.ID))
End Sub
The alert method included here generates the data:image as depicted below. I want to trap this so that a download is executed instead, how do I pass this back to execute the download? Another option will be to save this to a file for emailing purposes. Can someone please advise how I can achieve this feat?
Thanks a million..