External javascript graph

Is it possible to add JS graph like this one over here >https://mining-profit.com/api-bitcoin-chart< to my project?

I tried this script

javascript:$('head').append('<script src="https://mining-profit.com/js/mp-btc-chart.js"></script>'); void(0);

using OnPageLoad but it doesn’t work at all. I browsed whole forum but I wasn’t able to find topic that could help.

Pls, help :sweat:

Hi dvobecky!

While the use of JavaScript code goes outside the expertise of our help desk, you can add external code to your prototype using the Plugins feature on Axure Share:

https://www.axure.com/support/reference/axure-share-basics#plugins

It would be here that you would be able to add your JS graph code to the head, body, or to a specific dynamic panel in your project. Please note, however, that you will need to publish your project to Axure Share to utilize this feature.

1 Like

What exactly does not work? Are there errors in the console? Is the request for the script successful?

I tried this out and got the javascript to declare successfully (<script src="https://mining-profit.com/js/mp-btc-chart.js"></script>). Using the example script at the bottom of https://mining-profit.com/api-bitcoin-chart I could get the headers to be drawn but not the chart itself. Maybe the chart needs a specific div name which can’t be assigned by Axure? (Or alternatively, I didn’t know how to point the draw() command to a specific Axure widget.) I think there was a generic “can’t draw” error for the last command: MiningProfitBTCChart.draw();

It worked!!! :slight_smile: Thanks a lot!