FAQ: How to inject dynamic content into ScriptFollows-stuff?
1 post
• Page 1 of 1
FAQ: How to inject dynamic content into ScriptFollows-stuff?
When working with the JS-Components, you will often come across "ScriptFollows" which is followed by many lines of static code. When following that style, the question come up how to make these scripts more dynamic.
When I want to add dynamic content into such a script, I use the Subst utility:
Just be sure that MyData contains a correctly formatted JS-Array!
P.S: this post was created as a reply to a support-mail. We're trying to reply to questions of general interest (in an anonymized way) through the forums, so that everyone can benefit :-)
When I want to add dynamic content into such a script, I use the Subst utility:
- Code: Select all
MyData←...glorious calculations etc....
Add _.dimple('%ChartData%'MyData Subst ScriptFollows)
⍝...
⍝ myChart.data = %ChartData%
⍝...
Just be sure that MyData contains a correctly formatted JS-Array!
P.S: this post was created as a reply to a support-mail. We're trying to reply to questions of general interest (in an anonymized way) through the forums, so that everyone can benefit :-)
- Michael|Dyalog
- Posts: 23
- Joined: Thu Mar 02, 2017 4:29 pm
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group