Thanks for the demo. I was hoping to use high charts in WebDirect.
Has anyone got other chart libraries working in WebDirect?
IE don't support data: protocol in iframe src, then not work on WebDirect if you use IE to access WebDirect.
Other browsers work with encoded URL like
Case ( PatternCount(Get(ApplicationVersion) ; "web") ;
"data:text/html," & GetAsURLEncoded ( Replace ( WebViewers::resource_HighchartLineChart ; 1 ; 15 ; "" ) ) ;
for "Set Highchart LineChart" script.
(Only tested very few using Firefox and Chrome on Windows7)
Thanks for that! I am on Mac 10.11.2, safari 9.02, FMS14.02
Your script worked in safari but not Chrome which is a brilliant start and will help me with other resources!
It is interesting that don't work on Chrome on Mac.
It worked on Win7 and 10 using latest Chrome 47.0.2526.80
The html generated by your script will open in Chrome Version 47.0.2526.80 (64-bit) if I save it as an html file and open it directly, It does not render in WebinDirect.
It works with WebDirect on current iOS Safari and Chrome.
The calculation doesn't generate "html", it is "URL" for web viewer. So, if you want to test it directly, copy & paste it into address bar, not save & open.
But, it calculates dynamically for FMPro/Go or WebDirect in which web viewer is rendered, so not meaningful if used in browser.
To follow up, I don't use chrome much and I just clicked this shield in the top right and pressed Load unsafe scripts (as you do ). The charts work in Chrome WebDirect .
Only thing is that page shows an broken SSL error. I use a godaddy custom ssl
Thank you HammerOZ and User19752 for the improvements. I am looking forward for your file.
Mike is correct, changing URLs for external libraries/data to use https: make it work on https: web direct. (I tested only using default SSL)
At least highcharts documented as using all https: for CDN.
There is web server always if you use FMS, then you can put the libraries on your own web server, if you don't want to embed it in data: URL.
Thanks Mike and I guess local libraries have less chance of breaking It also enables offline FM Go chart solutions.
Yes that works on my ssl with chrome. No manual run unsafe scripts! I think I will put all the libraries local as I am going to need offline mobile charts.
I confirmed not work on Edge. It seems Edge need un-encoded html after data:text/html in src of iframe.
Anyway, it will never work on IE, so for WebDirect, it may be better to not use data: at all in web viewer. You can make some static html or php page getting parameter for charts, run on webd server.